Originally posted by: Puppy26
Hi all,
I have a simple expression in which I need to calculate the result and feed the value to calculate next result.
In my case, I need to retrieve the sum of the supply in warehouse. The value will be in matrix form 5*5 and it should be multiplied by certain number(say for example 50).
dexpr float DepotValue = CDSupply [c][d]* DSCFixed;
dexpr float RG = Revenue * ECDemanded;
dexpr float TC =
sum (d in Depots, t in Terminals) TermintoDepotCost [t][d] * TDSupply [t][d] +
sum (t in Terminals, d in Depots) DepottoTerminCost [d][t] * DTSupply [d][t] +
sum( d in Depots) DepottoDepotCost[d][d] * DDSupply [d][d] + DepotValue;
maximize RG-TC ;
I need the program should find the value of CDSupply which will be matrix of 5*5 [[0 0 0 0 1][0 0 0 1 0][0 0 1 0 0][0 1 0 0 0][1 0 0 0 0]] and multiply it by DSCFixed value (50) and feed the value to dexpr float TC to calculate the final result.
Could you please let me know how I should proceed further.
Many thanks!
Regards,
Prabhu
#CPLEXOptimizers#DecisionOptimization