Originally posted by: sej123
Hi for all,
I'm new at this forum so please be placable.
I start to experiment with CPLEX but I have some errors :/
When the formula is written there is no mistakes but when I run the configuration there are some errors.
I try to make mathematical model to solve to problem of the company to maximize the profits.
this is fragment of the model:
subject to
{ forall(t in 1..T)
{ he[t]<=Et[t]; sum(t in 1..T) he[t]<=E; Y[t-1]+X[t]-sum(p in 1..P)m[p][t]*Z[p]==Y[t]; X[t]<=M[t]; Y[t]<=RS;
} forall(t in 1..T,p in 1..P)
{ s[p][t-1]+n[p][t]+m[p][t]+r[p][t]==D[p][t]+s[p][t];
} forall(p in 1..P)
{ S0[p]==s[p][0];
}
}
And there are mistakes:
CPLEX(
default) cannot extract expression: forall(t in 1..12) (((he[(t)] <= Et[(t)] && sum(t in 1..12) he[(t)] <= 100) && Y[(t+(-1))]+X[(t)]+(sum(p in 1..10) m[(p)][(t)]*Z[(p)])*(-1) == Y[(t)]) && X[(t)] <= M[(t)]) && Y[(t)] <= 10000. CPLEX(
default) cannot extract model: IloAlgorithm cannot extract extractable. Index out of bound
for array
"Y": 0. OPL cannot extract expression: ((((he[(t)] <= Et[(t)] && sum(t in 1..12) he[(t)] <= 100) && Y[(t+(-1))]+X[(t)]+(sum(p in 1..10) m[(p)][(t)]*Z[(p)])*(-1) == Y[(t)]) && X[(t)] <= M[(t)]) && Y[(t)] <= 10000) && Y[0] == 0.
Thank for your time and help.
#DecisionOptimization#OPLusingCPLEXOptimizer