I want to solve my problem regarding optaplanner but I am confused on how should I design the model. I want to solve the problem regarding logistic service. For example I have 4 trucks,
- Truck A -> capacity 100
- Truck B -> capacity 200
- Truck C -> Capacity 150
- Truck D -> Capacity 50
and I have 4 orders from my client,
- Order 1 -> 250
- Order 2 -> 25
- Order 3 -> 50
- Order 4 -> 125
- Order 5 -> 50
How can I solve this problem? Some points to note are each truck can have 2 or more orders and each order can be split into 2 or more trucks so this is Many to Many problem.
Also how can I split "Order 1" to maximize each capacity of the trucks. For example when "Order 1" is split into Truck A and C, the "Order 1" will be split into 100 and 150. When split into Truck A and B, optaplanner can split the order and trying to find the optimal number, either split into 100 and 150 or 50 and 200
One idea to handle the split Order problem is to split the Order into smallest possible number, for example "Order 2" will be split into 5 part which each part consist of 5.
- Order 2 - 1 -> 5
- Order 2 - 2 -> 5
- Order 2 - 3 -> 5
- Order 2 - 4 -> 5
- Order 2 - 5 -> 5
The problem is when the Order become larger, it will create more part which will create larger search space and use larger memory. Is there another way to solve this problem? Thank you very much