Originally posted by: james87
sorry guys, really duno how to unhyperlink the brackets, so i changed some of the [] to () instead
Im trying to write a piece of code that optimize a ratio of two decision variables. apparently the division of variables is not allowed. I tried to linearised this fractional programming problem but apparently 1/dvar is also an invalid declaration in opl. Please help! im desperate.
Heres part of the code that i had which did not work
********************************************************************************************************************
int SampleN=5;
int AssetN=3
dvar float+ x(1..AssetN)(1..PeriodN)(1..SampleN); // Investment Level
dvar float+ w_end(1..SampleN);
dvar float+ float Bsum(1..SampleN);
Minimize
sum(k in 1..SampleN) 1/SampleN*(w_end[k]/Bsum[k]);
forall(k in 1..SampleN)
Bsum[k] == sum(i in 1..AssetN)Beta[i]*(x[i](PeriodN)[k]/sum( j in 1..AssetN)x[j](PeriodN)[k]);
********************************************************************************************************************
Thank you!
#DecisionOptimization#OPLusingCPLEXOptimizer