Originally posted by: SystemAdmin
[o_O said:]
Hi All,
It's my first time to use this language for programming. The purpose of the following codes is to block material flow with high cost penalty (store = 0 and ship = 1).
dvar boolean store[products][distributionCenters];
dvar boolean ship[orders][distributionCenters];
// 0:Stored in plant warehouse, 1 Otherwise
// 0:Shipped from plant warehouse, 1 Otherwise
dvar float+ inv[distributionCenters][products][timePeriods];
dvar float+ production[products][timePeriods];
// Objective Function Terms
// Shuttle Costs
dexpr float ShuttleCosts=
sum(d in demands, t in timePeriods, pr in products, dc1 in distributionCenters, dc2 in distributionCenters, ol in orderlines, s in ShuttlCosts: d.order==ol.order && d.product==ol.product && s.name==dc1 && s.period==t && d.period==t)
(d.demand*(2*store[ol.product][dc1]-ship[ol.order][dc2])*s.cost + 0.01/(store[ol.product][dc1]-ship[ol.order][dc2] + 1.01));
The error message:
The algorithm cannot extract expression: 0.01/(store[ol.product][dc1]+ship[ol.order][dc2]*(-1) + 1.01).
Please help.
#DecisionOptimization#OPLusingCPOptimizer