Hello
I am starting with the CP Optimizer C++ API interface and I must confess I find the documentation quite difficult to follow. Lucky there are examples in the installation directory! The reason to start with the C++ API instead of continuing with OPL is to try to find more flexibility when defining a model. Achieve application integration is also a goal. am I too wrong?
My current problem (one of them at least):
With the OPL I could use the ternary operator to do something like that (simplified model):
dexpr int TimeDif = (MaxTT - MinTT < ConstantValue ) ? 0 : MaxTT - MinTT;minimize staticLex ( DifMaxTiempoTrabajado, other objectives here )MaxTT and MinTT are expressions as well. Basically, what I am trying to achieve is to let the solver know that if
MaxTT - MinTT < ConstantValue then it is good enough and should look other objectives less important.
Is there an equivalente way to do this (the ternary operator) with C++ API ?
Thanks in advance and sorry if this is a basic question
------------------------------
javier rodrigo
------------------------------
#DecisionOptimization