Originally posted by: SystemAdmin
[jalloyd said:]
"==" is used in constraints to specify the the Left-hand side (LHS) must equal the RHS in a feasible solution to your optimization problem.
In your example, the orderDeliveryCost is defined by the RHS of that equation and the two must be equal in a feasible solution.
I'm assuming orderDeliveryCost is also a variable in your model? Alternatively, this constraint could be written as a descision expression instead, by defining:
[b] dexpr float orderDeliveryCost = sum (orders in orderPaths) cost[orders] * orderValidPath[orders];[/b]
Notice that this expression has a single "=" sign, denoting an assignment of the RHS to the decision expression variable on the LHS.
#DecisionOptimization#OPLusingCPLEXOptimizer