Dear all,
I want to create a cycle for-do and I want to have the values of the results for each considered point.
How can I write this in aimms?
For now I wrote this
for e| (epsilon_e(e))>epsilonl and (epsilon_e(e))
CO2_ec:=epsilon_e(e);
solve Min_Total_Costs;
Total_Costs_e(e):=Total_Costs;
endfor;
with e the index of a set epsilon_e, while Total_Costs_e(e) a variable.
I want to know the value of Total_Costs_e for each e. What is missing in the code?
Thanks
Best
GL
Solved
cycle do
Best answer by Chris Kuip
The set that is the range of index e can be declared as follows (where p_NumberOfPoints controls the set size):
View originalcode:
Parameter p_NumberOfPoints {
InitialData: 3;
}
Set s_Events {
SubsetOf: Integers;
Index: e;
Definition: ElementRange(1,p_NumberOfPoints);
}
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.