Forum Discussion
FICO
12 years agoCommunity Manager
Problems regarding one formula:
Hi Everybody! I'm fairly new to Xpress and had to develop an ILP for my thesis and calculate it with Xpress. Now I am stuck on a formula I don't know how to express within the Mosel language. Maybe...
FICO
12 years agoCommunity Manager
You would need a declaration like
declarations
Tr, Thatr, dmax: real
M,R: set of string
x: array (R,M) of mpvar
d: array (R,M) of real
my_constraint: array(R,R) of linctr
end-declarations
Then you need to read/assign the data and your constraints would look like
forall(r,hatr in R) do
my_constraint(r,hatr):= 1/Tr * sum(m in M) d(r,m)*x(r,m) - 1/Thatr * sum(m in M) d(hatr,m)*x(hatr,m) <= dmax
end-do
I assume you would want * in between the d(r,m) and the x(r,m) instead of +