Dear,
I have a binary variable in my model X(i,j,k,s) and I want that it assumes a value that I calculated in the deterministic model. For example I want that X(i,j,k,s)=X('Yorkshire and the Humber','MEA',k,s);
How can I write this in aimms?
I tried to write a constraint but after the run of the programme I don't have results for this variable.
Thanks for your help.
You could add a constraint with definition:
X(i,j,k,s) = X('Yorkshire and the Humber','MEA',k,s).level
If you use
X(i,j,k,s)=X('Yorkshire and the Humber','MEA',k,s)
then the term on the right-hand-side is also considered a variable in the math program, and therefore not fixed to a value.
Dear
in this way the model it is not working, I don’t have any results for X.
I thought to convert X in a parameter and then to fix the value that it should be have.
Is it correct?
You can also fix X('Yorkshire and the Humber','MEA',k,s) to a certain value by using the .nonvar suffix, so add the statement:
X('Yorkshire and the Humber','MEA',k,s).nonvar := 1;
before the second solve. And use a constraint:
X(i,j,k,s)=X('Yorkshire and the Humber','MEA',k,s)
You have to make sure that you do not empty or change the values of X between the deterministic and stochastic solve. If X is still empty then likely the model has either become infeasible or you are emptying X before the stochastic solve.
Hi
Was Marcel’s answer sufficient in providing a solution to your problem?
Best Regards
Dear
do you habe any other solution?
Best
Reply
Sign up
Already have an account? Login
Please use your business or academic e-mail address to register
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.