Originally posted by: SystemAdmin
Greetings fellow IBM Ilog users,
My group recently purchased ILog ODME and I have been assigned a task to migrate old optimization models developed with OMNI to ILog. I am currently working on a small transportation carrier selection model. I will appreciate your help with the syntax to get the following thing to work in OPL.
Origin(Primary) - Destination(Primary) - Carrier(Primary)
For a given route O1D1, there are multiple carriers - C1, C2, C3, C4 who can transport load. So we want the model to choose the cheapest carrier on this route. However the master carrier table has a complete list of carriers and not just the above four mentioned.
My formulation was
forall(ZCF in Destination, ZCT in Origin)
ctEstLoads:
sum(BC in Carrier)
Load
ZCFZCTBC == ELoads
ZCFZCT.EstLoads;
The above mentioned formulation does not choose carriers from C1, C2, C3 or C4.. Since I am using my master carrier table to loop over carriers, the model chooses the cheapest carrier from a list of all the carriers even though the carrier is not assigned to the route.
So to make things more clear. I have following tables.
_Routes_Table_ - Origin (Primary), Destination (Primary), Miles, EstLoads
EstLoads is the frequency a carrier has to travel from origin to destination in a year.
_Bids_Table_ - Origin (Primary), Destination (Primary), Carrier (Primary), $/mile
The Bids_Table will be used to assign the carriers on a route.
What would be a correct way to solve this constraint.
#DecisionOptimization#MathematicalProgramming-General