Collaboration VehicleRoutingProblem
Diagram
<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="Location" name="location" type="string">
</bpmnos:attribute>
<bpmnos:attribute id="EarliestVisit" name="earliest_visit" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="LatestVisit" name="latest_visit" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="HandlingDuration" name="handling_duration" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="LatenessPenalty" name="lateness_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>
Task RequestActivity
<bpmn2:extensionElements>
<bpmnos:messages>
<bpmnos:message name="Request">
<bpmnos:content attribute="quantity" key="Quantity">
</bpmnos:content>
<bpmnos:content attribute="location" key="Location">
</bpmnos:content>
<bpmnos:content attribute="instance" key="Customer">
</bpmnos:content>
<bpmnos:content attribute="handling_duration" key="HandlingDuration">
</bpmnos:content>
<bpmnos:content attribute="earliest_visit" key="EarliestVisit">
</bpmnos:content>
<bpmnos:content attribute="latest_visit" key="LatestVisit">
</bpmnos:content>
<bpmnos:content attribute="lateness_penalty" key="LatenessPenaty">
</bpmnos:content>
</bpmnos:message>
</bpmnos:messages>
</bpmn2:extensionElements>
Event CatchArrival
<bpmn2:extensionElements>
<bpmnos:message name="Arrival">
</bpmnos:message>
</bpmn2:extensionElements>
Event WaitEvent
<bpmn2:extensionElements>
<bpmnos:timer>
<bpmnos:parameter name="trigger" value="earliest_visit">
</bpmnos:parameter>
</bpmnos:timer>
</bpmn2:extensionElements>
Task LoadActivity
<bpmn2:extensionElements>
<bpmnos:status>
<bpmnos:operators>
<bpmnos:operator expression="timestamp += handling_duration" id="Operator_2q512kt">
</bpmnos:operator>
</bpmnos:operators>
</bpmnos:status>
</bpmn2:extensionElements>
Event ThrowShipmentHandled
<bpmn2:extensionElements>
<bpmnos:message name="Ready">
</bpmnos:message>
</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="CustomerLocation" name="customer_location" type="string">
</bpmnos:attribute>
<bpmnos:attribute id="EarliestVisit" name="earliest_visit" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="LatestVisit" name="latest_visit" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="HandlingDuration" name="handling_duration" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="LatenessPenalty" name="lateness_penalty" objective="none" type="decimal">
</bpmnos:attribute>
</bpmnos:attributes>
<bpmnos:restrictions>
<bpmnos:restriction expression="load <= capacity" id="Restriction_1q6ed62" scope="exit">
</bpmnos:restriction>
<bpmnos:restriction expression="pending == 0" id="Restriction_3o3t8f8" scope="exit">
</bpmnos:restriction>
</bpmnos:restrictions>
<bpmnos:operators>
<bpmnos:operator expression="pending += 1" id="Operator_15659lk">
</bpmnos:operator>
<bpmnos:operator expression="requests_made += 1" id="Operator_36m5puq">
</bpmnos:operator>
<bpmnos:operator expression="load += quantity" id="Operator_1h6f9d5">
</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="customer_location" key="Location">
</bpmnos:content>
<bpmnos:content attribute="customer" key="Customer">
</bpmnos:content>
<bpmnos:content attribute="earliest_visit" key="EarliestVisit">
</bpmnos:content>
<bpmnos:content attribute="latest_visit" key="LatestVisit">
</bpmnos:content>
<bpmnos:content attribute="lateness_penalty" key="LatenessPenaty">
</bpmnos:content>
</bpmnos:message>
<bpmnos:guidance type="message">
<bpmnos:attributes>
<bpmnos:attribute id="TripDurationGuidance" name="trip_duration := duration(location,customer_location)" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="VisitTimeGuidance" name="visit_time := max(timestamp + trip_duration, earliest_visit)" objective="minimize" type="decimal" weight="1">
</bpmnos:attribute>
</bpmnos:attributes>
<bpmnos:restrictions>
<bpmnos:restriction expression="load + quantity <= capacity" id="Restriction_0bfkb17" scope="exit">
</bpmnos:restriction>
</bpmnos:restrictions>
</bpmnos:guidance>
</bpmn2:extensionElements>
SubProcess VisitCustomerActivity
<bpmn2:extensionElements>
<bpmnos:status>
</bpmnos:status>
</bpmn2:extensionElements>
Task CustomerTrip
<bpmn2:extensionElements>
<bpmnos:status>
<bpmnos:attributes>
<bpmnos:attribute id="TripCosts" name="costs := costs(location,customer_location)" type="decimal">
</bpmnos:attribute>
<bpmnos:attribute id="TripDuration" name="duration := duration(location,customer_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 + lateness_penalty * max(0, timestamp - latest_visit)" id="Operator_2prbur9">
</bpmnos:operator>
<bpmnos:operator expression="location := customer_location" id="Operator_139nh6c">
</bpmnos:operator>
<bpmnos:operator expression="pending -= 1" id="Operator_2rhlm19">
</bpmnos:operator>
</bpmnos:operators>
</bpmnos:status>
<bpmnos:guidance type="entry">
<bpmnos:attributes>
<bpmnos:attribute id="TripGuidance" name="trip_guidance := costs + lateness_penalty * max(0, timestamp - latest_visit)" objective="maximize" type="decimal" weight="1">
</bpmnos:attribute>
</bpmnos:attributes>
</bpmnos:guidance>
</bpmn2:extensionElements>
Event ThrowArrival
<bpmn2:extensionElements>
<bpmnos:message name="Arrival">
<bpmnos:parameter name="recipient" value="customer">
</bpmnos:parameter>
</bpmnos:message>
</bpmn2:extensionElements>
Event CatchShipmentHandled
<bpmn2:extensionElements>
<bpmnos:message name="Ready">
<bpmnos:parameter name="sender" value="customer">
</bpmnos:parameter>
</bpmnos:message>
</bpmn2:extensionElements>
DataStoreReference DataStoreReference_1o75s8b
<bpmn2:extensionElements>
<bpmnos:tables>
<bpmnos:table id="Table_3523pbq" name="duration" source="durations.csv">
</bpmnos:table>
<bpmnos:table id="Table_2thnfrk" name="costs" source="costs.csv">
</bpmnos:table>
</bpmnos:tables>
</bpmn2:extensionElements>