Case Study Transportation Scheduling - Gnorion/BizVR GitHub Wiki
Case Study - Transportation Scheduling
Problem Statement
Customer orders need to be delivered. Suitable tractors and trailers and drivers need to be assigned. Drivers and tractors must meet certain mandatory requirements. Additionally customers may specify additional requirements that drivers and trucks must meet
Different Approaches
There are eight different approaches we could take:
- Standard decision tables for all the rules and allow the inferencing mechanism to control the execution.
- Standard decision tables for the core scheduling part but use functions to implement the rules about meeting requirements
- Standard decision tables for the core scheduling part but use methods and polymorphism to implement the rules about meeting requirements
- Every decision table is a function
- Every decision table is a method
- Every decision table is either a function or a method (no standard decision tables)
- Mixture of standard decision tables, functions and methods
- No decision tables of any kind
Approach 1 Standard Decision Tables with Inferencing
All references are to objects and their attributes. All objects are “in scope” for all tables. That is they are global across all of the decision tables, but local to the entire decision. Data is passed in as formal inputs and returned as formal outputs. Microservices may load additional data (for example from API calls or database queries or interactive dialogs)
The order of execution is determined automatically using forward or backward chaining
Approach 2 Functions and Standard Decision Tables
Standard tables handling the scheduling and optimization. Function tables are used to check that drivers and trucks meet any requirements. see decision table detail
Approach 3 Methods and Polymorphism and Standard Decision Tables
Instead of using functions (which are global and therefore must have unique names) we use methods which are local to the class for which they are defined and thus can have the same names. The context of the call will determine which particular implementation gets executed. see decision table detail
Approach 4 Every Decision Table is Implemented as a Function
We use the same function tables as in approach 2 but the two standard tables are now implemented as pure functions. Because everything is driven by the function calls, inferencing plays no part in the execution across decision tables. But there might still be inferencing within individual tables. see decision table detail
Alternative Decision Structures using included function libraries
Approach 5 Every Decision Table is Implemented as a Method
Defining Test Data For The Transportation Scheduling Example