hello,
In my project,I want to first calculate the minimum amount of water required in an urban case study.after that,based on the amount of fresh water used and amount of water reused,calculate the piping,installation price etc…
My objective function should e to minimize the total cost which includes cost of fresh water and piping.
When i calculate the amount of water needed for the result is correct but when i add formulations to calculate the piping,the solver gives a wrong answer and changes the amount of fresh water used " which has been calculated previously " .
My question is that, how can i fix the result of my previous calculations ( fresh water usage etc. ) to use them for further formulations?
for example :
freshwater =e= sum (j,fw(j)) ;
then somehow fix the answer for freshwater to use in further formulations.
thank you all very much
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
\
hi,
In the second model, you’d better use a parameter instead of variable; After solving model 1,
FreshWaterPar = freshwater.l
then solve model 2.
From: Mohamad Dehghani
To: gamsworld@googlegroups.com
Sent: Wednesday, April 10, 2013 2:09 PM
Subject: fix a variable
hello,
In my project,I want to first calculate the minimum amount of water required in an urban case study.after that,based on the amount of fresh water used and amount of water reused,calculate the piping,installation price etc…
My objective function should e to minimize the total cost which includes cost of fresh water and piping.
When i calculate the amount of water needed for the result is correct but when i add formulations to calculate the piping,the solver gives a wrong answer and changes the amount of fresh water used " which has been calculated previously " .
My question is that, how can i fix the result of my previous calculations ( fresh water usage etc. ) to use them for further formulations?
for example :
freshwater =e= sum (j,fw(j)) ;
then somehow fix the answer for freshwater to use in further formulations.
thank you all very much
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
\
Hello,
I see 2 models here.
the one you used to calculate the amount of water needed (M1)
and the one with more formulations (M2).
so you need to call the solver 2 times.
After 1st solve, you can fix the variable at their current value:
solve M1 …

fix
FreshWater.fx = FreshWater.l;

then start the 2nd run.
Model M2 /M1, ExtraFormulations/;
solve M2 …
HTH,
Yan
My question is that, how can i fix the result of my previous calculations ( fresh water usage etc. ) to use them for further formulations?
for example :
freshwater =e= sum (j,fw(j)) ;
then somehow fix the answer for freshwater to use in further formulations.
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
\