カー・シェアリングのビジネス・モデルの例

以下の例は、カー・シェアリング・アプリケーションのビジネス・モデルを示した .bmd ファイルの内容です。 このファイルでは、モデルを構成するエンティティー・タイプ、イベント・タイプ、および列挙子を記述します。 このモデルでは、地理的ロケーションの表現に地理空間タイプを使用した例を示しています。

このモデルは、複数の車を配置して従業員が車を運転して事業所間を移動できるようにする組織のシナリオを表しています。

ビジネス・モデル定義:

-----------------------------------------------
-- These phrases define a parking lot entity --
-----------------------------------------------
a parking lot is a business entity identified by an id . 
a parking lot has a name.
a parking lot has a parking area (a polygon).
a parking lot can be open.
a parking lot has some available cars (integers).
a parking lot has some available places (integers).
a parking lot is related to an organization.

-------------------------------------------------------
-- These phrases define a parking tariff zone entity --
-------------------------------------------------------
a parking tariff zone is a business entity identified by an id.
a parking tariff zone has an area (a polygon).
a parking tariff zone has a tariff (a number).

-------------------------------------------------------------
-- These phrases define a parking tariff zone update event --
-------------------------------------------------------------
a parking tariff zone update is a business event, related to a parking tariff zone.
a parking tariff zone update has an updated area (a polygon).

------------------------------------------
-- These phrases define a driver entity --
------------------------------------------
a driver is a business entity identified by an id with a name , a category (integer), a location (a point).
a driver is related to an organization.

---------------------------------------
-- These phrases define a car entity --
---------------------------------------
a car is a business entity identified by a plate number with a model, a passenger capacity (integer), a color, a location (a moving geometry).
a car has a status (a car status).
a car is related to a driver.
a car is related to an organization.

--------------------------------------------------
-- This phrase defines a car status enumeration --
--------------------------------------------------
a car status can be one of: AVAILABLE, ORDERED, DELAYED, WRONG PARKING, MALFUNCTION.

------------------------------------------
-- These phrases define an order entity --
------------------------------------------
an order is a business entity identified by an id.
an order has a placed time (time).
an order has a required time (time).
an order has a return time (time).
an order is related to a parking lot.
an order is related to a driver. 
an order is related to a car.
an order is related to a next order (an order).
an order is related to an organization.

-------------------------------------------------
-- These phrases define an organization entity --
-------------------------------------------------
an organization is a business entity identified by an id.
an organization has some alerts.
an organization is related to some parking lots.
an organization is related to some cars.

-----------------------------------------------
-- These phrases define a car location event --
-----------------------------------------------
a car location event is a business event with a location (a point).
a car location event is related to a car.

---------------------------------------------
-- These phrases define a car rented event --
---------------------------------------------
a car rented event is a business event with a location (a point).
a car rented event is related to a parking lot.
a car rented event is related to an order.
a car rented event is related to a car.

-----------------------------------------------
-- These phrases define a car returned event --
-----------------------------------------------
a car returned event is a business event with a location (a point).
a car returned event is related to a parking lot.
a car returned event is related to an order.
a car returned event is related to a car.
a car returned event is related to an organization.

--------------------------------------------
-- These phrases define a car issue event --
--------------------------------------------
a car issue event is a business event with a location (a point), a delay (numeric), a type (an issue type).
a car issue event has an expected return time (time).
a car issue event is related to a car.
a car issue event is related to an order.
a car issue event is related to a driver.
a car issue event is related to an organization.

---------------------------------------------------
-- This phrase defines an issue type enumeration --
---------------------------------------------------
an issue type can be one of: DELAY, MALFUNCTION.

----------------------------------------------
-- These phrases define a car delayed event --
----------------------------------------------
a car delayed event is a business event.
a car delayed event is related to a driver. 
a car delayed event is related to a car.

--------------------------------------------------
-- These phrases define a car issue alert event --
--------------------------------------------------
a car issue alert is a business event with an issue.
a car issue alert is related to a driver.
a car issue alert is related to a car.
a car issue alert is related to an order.