Originally posted by: sandeepsinghchauhan
yes but Xtotal is an dexpr used by Process (asSet(1..20)) which is a set and in my actual problem Xtotal used by PR which is a tuple
{string} C = { "CANDY1"," CANDY2","CANDY3","CANDY4"};
{int} PRO[C] = [{1,2 ,3} ,{4, 5} ,{6, 7, 8, 9}, {10, 11, 12, 13}] ;
dvar float x[D];
tuple t
{
key int pr;
float sa;
}
{t} PR= ...;
dexpr float Xtotal[p in PR] = sum(some expression)X[D] ;
subject to
{
forall (p in C) {
sum(s in PRO[p])item(Xtotal,s).sa >= 1;
}
}
ERROR
The function item(dexpr float[Pr],int) does not exist.
#DecisionOptimization#OPLusingCPLEXOptimizer