I wish to solve a linear program with an objective function:
Here x[i][j] are decision variables and y[i][j] are already precomputed.
I was writing the code for this in CPLEX python (DOcplex) and was receiving the error that the denominator can only be a number. Is there a way to do this correctly?
This is my code:
l_model.minimize(l_model.sum(l_model.sum(x[i,j]*y[(i,j)] for j in A)/l_model.sum(x[i,j] for j in A) for i in B))