BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
Pickup and delivery problem

Collaboration PickupDeliveryProblem

Diagram

PickupDeliveryProblem

<bpmn2:extensionElements>
<bpmnos:attributes>
<bpmnos:attribute id="RequestsExpected" name="requests_expected" type="integer">
</bpmnos:attribute>
<bpmnos:attribute id="RequestsMade" name="requests_made := 0" type="integer">
</bpmnos:attribute>
</bpmnos:attributes>
</bpmn2:extensionElements>

Process CustomerProcess

<bpmn2:extensionElements>
<bpmnos:status>
<bpmnos:attributes>
<bpmnos:attribute id="Timestamp" name="timestamp" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="Quantity" name="quantity" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="PickupLocation" name="pickup_location" type="string">
</bpmnos:attribute>
<bpmnos:attribute id="EarliestPickup" name="earliest_pickup" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="LatestPickup" name="latest_pickup" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="PickupDuration" name="pickup_duration" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="LatePickupPenalty" name="late_pickup_penalty" objective="none" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="DeliveryLocation" name="delivery_location" type="string">
</bpmnos:attribute>
<bpmnos:attribute id="EarliestDelivery" name="earliest_delivery" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="LatestDelivery" name="latest_delivery" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="DeliveryDuration" name="delivery_duration" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="LateDeliveryPenalty" name="late_delivery_penalty" objective="none" type="decimal">
</bpmnos:attribute>
</bpmnos:attributes>
</bpmnos:status>
</bpmn2:extensionElements>

DataObject DataObject_0m5xj0p

<bpmn2:extensionElements>
<bpmnos:attributes>
<bpmnos:attribute id="Instance" name="instance" type="string">
</bpmnos:attribute>
</bpmnos:attributes>
</bpmn2:extensionElements>

Event ThrowShipmentUnloaded

<bpmn2:extensionElements>
<bpmnos:message name="Unloaded">
</bpmnos:message>
</bpmn2:extensionElements>

Task UnloadActivity

<bpmn2:extensionElements>
<bpmnos:status>
<bpmnos:operators>
<bpmnos:operator expression="timestamp += delivery_duration" id="Operator_0ihu3a7">
</bpmnos:operator>
</bpmnos:operators>
</bpmnos:status>
</bpmn2:extensionElements>

Event DeliveryWaitEvent

<bpmn2:extensionElements>
<bpmnos:timer>
<bpmnos:parameter name="trigger" value="earliest_delivery">
</bpmnos:parameter>
</bpmnos:timer>
</bpmn2:extensionElements>

Task LoadActivity

<bpmn2:extensionElements>
<bpmnos:status>
<bpmnos:operators>
<bpmnos:operator expression="timestamp += pickup_duration" id="Operator_2q512kt">
</bpmnos:operator>
</bpmnos:operators>
</bpmnos:status>
</bpmn2:extensionElements>

Event PickupWaitEvent

<bpmn2:extensionElements>
<bpmnos:timer>
<bpmnos:parameter name="trigger" value="earliest_pickup">
</bpmnos:parameter>
</bpmnos:timer>
</bpmn2:extensionElements>

Event CatchPickupArrival

<bpmn2:extensionElements>
<bpmnos:message name="Arrival">
</bpmnos:message>
</bpmn2:extensionElements>

Event ThrowShipmentLoaded

<bpmn2:extensionElements>
<bpmnos:message name="Loaded">
</bpmnos:message>
</bpmn2:extensionElements>

Event CatchDestinationArrival

<bpmn2:extensionElements>
<bpmnos:message name="Arrival">
</bpmnos:message>
</bpmn2:extensionElements>

Task RequestActivity

<bpmn2:extensionElements>
<bpmnos:messages>
<bpmnos:message name="Request">
<bpmnos:content attribute="quantity" key="Quantity">
</bpmnos:content>
<bpmnos:content attribute="pickup_location" key="PickupLocation">
</bpmnos:content>
<bpmnos:content attribute="delivery_location" key="DeliveryLocation">
</bpmnos:content>
<bpmnos:content attribute="instance" key="Customer">
</bpmnos:content>
<bpmnos:content attribute="pickup_duration" key="PickupDuration">
</bpmnos:content>
<bpmnos:content attribute="earliest_pickup" key="EarliestPickup">
</bpmnos:content>
<bpmnos:content attribute="latest_pickup" key="LatestPickup">
</bpmnos:content>
<bpmnos:content attribute="delivery_duration" key="DeliveryDuration">
</bpmnos:content>
<bpmnos:content attribute="earliest_delivery" key="EarliestDelivery">
</bpmnos:content>
<bpmnos:content attribute="latest_delivery" key="LatestDelivery">
</bpmnos:content>
<bpmnos:content attribute="late_pickup_penalty" key="LatePickupPenaty">
</bpmnos:content>
<bpmnos:content attribute="late_delivery_penalty" key="LateDeliveryPenalty">
</bpmnos:content>
</bpmnos:message>
</bpmnos:messages>
</bpmn2:extensionElements>

Process VehicleProcess

<bpmn2:extensionElements>
<bpmnos:status>
<bpmnos:attributes>
<bpmnos:attribute id="Timestamp" name="timestamp" type="decimal">
</bpmnos:attribute>
</bpmnos:attributes>
</bpmnos:status>
</bpmn2:extensionElements>

DataObject DataObject_0w1vb0b

<bpmn2:extensionElements>
<bpmnos:attributes>
<bpmnos:attribute id="Instance" name="instance" type="string">
</bpmnos:attribute>
</bpmnos:attributes>
</bpmn2:extensionElements>

DataObject DataObject_13lokie

<bpmn2:extensionElements>
<bpmnos:attributes>
<bpmnos:attribute id="Load" name="load := 0" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="AccumulatedCosts" name="accumulated_costs := 0" objective="minimize" type="decimal" weight="1">
</bpmnos:attribute>
<bpmnos:attribute id="Capacity" name="capacity" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="EarliestAvailability" name="earliest_availability" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="LatestAvailability" name="latest_availability" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="OvertimePenalty" name="overtime_penalty" objective="none" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="Depot" name="depot" type="string">
</bpmnos:attribute>
<bpmnos:attribute id="Pending" name="pending := 0" type="integer">
</bpmnos:attribute>
<bpmnos:attribute id="Location" name="location := depot" type="string">
</bpmnos:attribute>
</bpmnos:attributes>
</bpmn2:extensionElements>

Task ReturnTrip

<bpmn2:extensionElements>
<bpmnos:status>
<bpmnos:attributes>
<bpmnos:attribute id="ReturnTripCosts" name="costs := costs(location,depot)" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="ReturnTripDuration" name="duration := duration(location,depot)" type="decimal">
</bpmnos:attribute>
</bpmnos:attributes>
<bpmnos:restrictions>
<bpmnos:restriction expression="pending == 0" id="Restriction_3kah7s3" scope="entry">
</bpmnos:restriction>
<bpmnos:restriction expression="requests_made == requests_expected" id="Restriction_1hjnnka" scope="entry">
</bpmnos:restriction>
</bpmnos:restrictions>
<bpmnos:operators>
<bpmnos:operator expression="timestamp += duration" id="Operator_3fddcqg">
</bpmnos:operator>
<bpmnos:operator expression="accumulated_costs += costs + overtime_penalty * max(0, timestamp - latest_availability)" id="Operator_22uvufq">
</bpmnos:operator>
<bpmnos:operator expression="location := depot" id="Operator_0q6fg6j">
</bpmnos:operator>
</bpmnos:operators>
</bpmnos:status>
</bpmn2:extensionElements>

Event-SubProcess EventSubProcess

<bpmn2:extensionElements>
<bpmnos:status>
<bpmnos:attributes>
<bpmnos:attribute id="Customer" name="customer" type="string">
</bpmnos:attribute>
<bpmnos:attribute id="Quantity" name="quantity" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="PickupLocation" name="pickup_location" type="string">
</bpmnos:attribute>
<bpmnos:attribute id="EarliestPickup" name="earliest_pickup" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="LatestPickup" name="latest_pickup" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="PickupDuration" name="pickup_duration" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="LatePickupPenalty" name="late_pickup_penalty" objective="none" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="DeliveryLocation" name="delivery_location" type="string">
</bpmnos:attribute>
<bpmnos:attribute id="EarliestDelivery" name="earliest_delivery" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="LatestDelivery" name="latest_delivery" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="DeliveryDuration" name="delivery_duration" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="LateDeliveryPenalty" name="late_delivery_penalty" objective="none" type="decimal">
</bpmnos:attribute>
</bpmnos:attributes>
<bpmnos:operators>
<bpmnos:operator expression="pending += 1" id="Operator_15659lk">
</bpmnos:operator>
<bpmnos:operator expression="requests_made += 1" id="Operator_36m5puq">
</bpmnos:operator>
</bpmnos:operators>
</bpmnos:status>
</bpmn2:extensionElements>

Event StartEventRequest

<bpmn2:extensionElements>
<bpmnos:message name="Request">
<bpmnos:content attribute="quantity" key="Quantity">
</bpmnos:content>
<bpmnos:content attribute="pickup_location" key="PickupLocation">
</bpmnos:content>
<bpmnos:content attribute="delivery_location" key="DeliveryLocation">
</bpmnos:content>
<bpmnos:content attribute="customer" key="Customer">
</bpmnos:content>
<bpmnos:content attribute="earliest_pickup" key="EarliestPickup">
</bpmnos:content>
<bpmnos:content attribute="latest_pickup" key="LatestPickup">
</bpmnos:content>
<bpmnos:content attribute="delivery_duration" key="DeliveryDuration">
</bpmnos:content>
<bpmnos:content attribute="earliest_delivery" key="EarliestDelivery">
</bpmnos:content>
<bpmnos:content attribute="latest_delivery" key="LatestDelivery">
</bpmnos:content>
<bpmnos:content attribute="late_pickup_penalty" key="LatePickupPenaty">
</bpmnos:content>
<bpmnos:content attribute="late_delivery_penalty" key="LateDeliveryPenalty">
</bpmnos:content>
<bpmnos:content attribute="pickup_duration" key="PickupDuration">
</bpmnos:content>
</bpmnos:message>
</bpmn2:extensionElements>

SubProcess PickupActivity

<bpmn2:extensionElements>
<bpmnos:status>
<bpmnos:restrictions>
<bpmnos:restriction expression="load + quantity <= capacity" id="Restriction_1tq1uu7" scope="entry">
</bpmnos:restriction>
<bpmnos:restriction expression="requests_made == requests_expected" id="Restriction_057idh3" scope="entry">
</bpmnos:restriction>
</bpmnos:restrictions>
</bpmnos:status>
</bpmn2:extensionElements>

Task PickupTrip

<bpmn2:extensionElements>
<bpmnos:status>
<bpmnos:attributes>
<bpmnos:attribute id="PickupTripCosts" name="costs := costs(location,pickup_location)" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="PickupTripDuration" name="duration := duration(location,pickup_location)" type="decimal">
</bpmnos:attribute>
</bpmnos:attributes>
<bpmnos:operators>
<bpmnos:operator expression="timestamp += duration" id="Operator_1gtrgqi">
</bpmnos:operator>
<bpmnos:operator expression="accumulated_costs += costs + late_pickup_penalty * max(0, timestamp - latest_pickup)" id="Operator_2prbur9">
</bpmnos:operator>
<bpmnos:operator expression="location := pickup_location" id="Operator_139nh6c">
</bpmnos:operator>
</bpmnos:operators>
</bpmnos:status>
</bpmn2:extensionElements>

Event ThrowPickupArrival

<bpmn2:extensionElements>
<bpmnos:message name="Arrival">
<bpmnos:parameter name="recipient" value="customer">
</bpmnos:parameter>
</bpmnos:message>
</bpmn2:extensionElements>

Task LoadReceiveTask

<bpmn2:extensionElements>
<bpmnos:messages>
<bpmnos:message name="Loaded">
<bpmnos:parameter name="sender" value="customer">
</bpmnos:parameter>
</bpmnos:message>
</bpmnos:messages>
<bpmnos:status>
<bpmnos:operators>
<bpmnos:operator expression="load += quantity" id="Operator_2chf0s1">
</bpmnos:operator>
</bpmnos:operators>
</bpmnos:status>
</bpmn2:extensionElements>

SubProcess DeliveryActivity

<bpmn2:extensionElements>
<bpmnos:status>
</bpmnos:status>
</bpmn2:extensionElements>

Task DeliveryTrip

<bpmn2:extensionElements>
<bpmnos:status>
<bpmnos:attributes>
<bpmnos:attribute id="DeliveryTripCosts" name="costs := costs(location,delivery_location)" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="DeliveryTripDuration" name="duration := duration(location,delivery_location)" type="decimal">
</bpmnos:attribute>
</bpmnos:attributes>
<bpmnos:operators>
<bpmnos:operator expression="timestamp += duration" id="Operator_3p8q2m9">
</bpmnos:operator>
<bpmnos:operator expression="accumulated_costs += costs + late_delivery_penalty * max(0, timestamp - latest_delivery)" id="Operator_1u25i5m">
</bpmnos:operator>
<bpmnos:operator expression="location := delivery_location" id="Operator_0vf75u3">
</bpmnos:operator>
</bpmnos:operators>
</bpmnos:status>
</bpmn2:extensionElements>

Event CatchArrival

<bpmn2:extensionElements>
<bpmnos:message name="Arrival">
<bpmnos:parameter name="recipient" value="customer">
</bpmnos:parameter>
</bpmnos:message>
</bpmn2:extensionElements>

Task UnloadReceiveTask

<bpmn2:extensionElements>
<bpmnos:messages>
<bpmnos:message name="Unloaded">
<bpmnos:parameter name="sender" value="customer">
</bpmnos:parameter>
</bpmnos:message>
</bpmnos:messages>
<bpmnos:status>
<bpmnos:operators>
<bpmnos:operator expression="load -= quantity" id="Operator_1chf0s1">
</bpmnos:operator>
<bpmnos:operator expression="pending -= 1" id="Operator_3mi8p4t">
</bpmnos:operator>
</bpmnos:operators>
</bpmnos:status>
</bpmn2:extensionElements>

DataStoreReference DataStoreReference_1uwtm3x

<bpmn2:extensionElements>
<bpmnos:tables>
<bpmnos:table id="Table_1nmu2oi" name="duration" source="durations.csv">
</bpmnos:table>
<bpmnos:table id="Table_05lbk15" name="costs" source="costs.csv">
</bpmnos:table>
</bpmnos:tables>
</bpmn2:extensionElements>