Originally posted by: ouaigooo
Thanks, but it doesn't help that much.
I could indeed expect that there exist examples where it works.
But the question is: why it doesn't work in my case ?
With the subsidary question: when does it work and when not ?
Here is more info about my code:
It crashes in an execute block (post-processing):
for (var t in OPTSTEPS) f.writeln(t.start + ";" + t.stop + ";" + TIME_STAMP[t] + ";" + power_el[i][t]);
In the model file, we have:
dvar float boiler_Pel[BOILERS,SCENARII,BSTEPS] in -10..10;
dvar float+ machine_power_var[MACHINES diff BOILERS][SCENARII][OPTSTEPS];
dexpr float machine_power[x in MACHINES][i in SCENARII][t in OPTSTEPS] =
((x in BOILERS) ? boiler_Pel[x,i,Bstep[t]] : machine_power_var[x,i,t]);
dexpr float power_el[i in SCENARII][o in OPTSTEPS] = 0
+ sum(x in RESIDUAL_POWER: (o.start < x.stop) && (o.stop > x.start)) x.value * (minl(o.stop, x.stop) - maxl(o.start, x.start)) / (o.stop - o.start)
+ sum(x in MACHINES) item(MACHINE_SIGN,<x>).value * machine_power[x,i,o]
;
RESIDUAL_POWER is pure data.
Any guess why it crashes and how I could adapt ?
#DecisionOptimization#OPLusingCPLEXOptimizer