Dear all
I have two variables: X and Y with index domain t.
I want to write in definition of X such as
XX0] = 0.3
XX1] = XX0] + YY1]
XX2] = XX1] + YY2]
….
How do I write in definition part of variable X ? Please help me
Thank you so much
Dear all
I have two variables: X and Y with index domain t.
I want to write in definition of X such as
XX0] = 0.3
XX1] = XX0] + YY1]
XX2] = XX1] + YY2]
….
How do I write in definition part of variable X ? Please help me
Thank you so much
I would try:
0.3 $ (Ord(t) = 1)
+
x(t-1) + y(t) $ (Ord(t) > 1)
It is very helpful. Thank you very much,
if ord(t) = 1 then
0.3
else
x(t-1) + y(t)
endif
This will generate the below constraints - assuming that the elements in set T are {0,1,2,3,...}
x(0) = 0.3
x(1) = x(0) + y(1)
x(2) = x(1) + y(2)
….
this command is easy to understand and useful. Thank you a lot
Already have an account? Login
Please use your business or academic e-mail address to register
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Didn't find what you were looking for? Try searching on our documentation pages: