Originally posted by: sandeepsinghchauhan
I have a cost data (cost) in a matrix form
p L1 L2 L3
1 25 30 36
2 32 44 65
3 40 66 85
4 12 88 40
5 10 42 36
Now I want to call this data with the help of piecewise
I want to write this equation with the help of piecewise function
dexpr float profit =sum(j in p)(cost[j][1]*L[j]+cost[j][2]*M[j]+cost[j][3]*H[j]);
p is from 1 to 5, L M H are dvar
Please help!
#DecisionOptimization#OPLusingCPLEXOptimizer