Originally posted by: mutinifni
Hello,
I have only recently begun using CPLEX, and I want to solve the LP mentioned in section 5 of this paper:
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.86.1151&rep=rep1&type=pdf
I am using the command-line CPLEX optimizer and modeling the problem in a plain .lp file. Hence, I have:
\ Constants
int N;
int M;
float u[N][M];
range tasks = 1..N;
range processors = 1..M;
\ Problem model
minimize
obj: U
subject to
sum(j in processors) x[i][j] = 1 for i in tasks \ (N equations)
sum(i in tasks) [ u[i][j] * x[i][j] ] - U <= 0 for j in processors \ (M inequalities)
bounds
0 <= x[i][j] for i in tasks, for j in processors
0 <= U
end
I understand it is possible to model this problem by using individual variables such as x11, x12, x21, etc. However using a 2D array would be easier.
However, CPLEX does not allow me to use x[i][j] variables if represented as above. Is it possible to do so? Also, can "for i in tasks, for j in processors" notation be used?
Thank you.
#CPLEXOptimizers#DecisionOptimization