Originally posted by: adsi
hey guys,
i am trying to model a negotiation-based approach in cplex, which i only started using recently, between two entities. as a planning problem, i'm using the multi-level capacitated lot sizing problem along with the respective extensions. now i'm at the point where e.g. the supplier determines its preferred outcome based on the order proposal from the buyer in order to improve the supplier's cost situation, while staying within specific limits in order to not deviate significantly from the original supply propsal.
my problem now is how to compute the cumulated order quantity requested by the buyer in a preprocessing block. what i have right now is the following:
float cumordquantity[orderoperations][periods];
execute cumulated_order_quantities {
var j;
var t;
for (t=0; t<NbPeriods; t++) {
for (j=1; j<=NbOrderOperations; j++) {
if (t==0) cumordquantity[j][t]=0;
else cumordquantity[j][t] = cumordquantity[j][t-1]+ propordquantity[j][t];
}
}
};
however,i'm getting an error as follows, which i cannot really interpret:
Scripting runtime error: Index out of bound for array "cumordquantity(5)", "13".
does anyone have a potential hint how to resolve this, or how i may best compute a cumulative sum?
thanks in advance!
#DecisionOptimization#OPLusingCPLEXOptimizer