Hello,
Thank you for your information, but I do not know how to save the intatial values of solvinf models as “$include start.inc”
How to biuld start.inc?
thnak you,
Azadeh
On Monday, October 13, 2014 at 4:07:25 PM UTC+3:30, Renger van Nieuwkoop wrote:
Hi Ni
You could use the option statement
Here an example using conopt and path, where the results of the first solve are automatically used in the second solve. Option solve = conopt;
Solve mymodel maximizing obj using nlp;
Option solve = pathnlp;
Solve mymodel maximizing obj using nlp;
If you want to use the same starting values as in the first solve, you could write an include file that contains the start values for all variables
In file “start.incâ€
VAR1.L = 1;
VAR2.L = 1;
Etc.
$include start.inc
Solve mymodel maximizing obj using nlp;
$include start.inc
Option solve = pathnlp;
Solve mymodel maximizing obj using nlp;
You could of course repeat the code in the main file, but that is bad coding practice (violates the DRY (don’t repeat yourself principle in programming).
Cheers
Renger
Modelworks
Gewerbestrasse 15
3600 Thun – Switzerland
+41 79 818 53 73
In…@modelworks.ch
blog.modelworks.ch
From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of ni le
Sent: Montag, 13. Oktober 2014 12:52
To: gams...@googlegroups.com
Subject: How to solve a problem in GAMS using multiple solvers?
Hi all,
I would like to solve a problem in GAMS by first solving it with one solver and then switch to the other solver using the initial result from the first solver.
Is there anyone know how to do this?
Thank you very much!
Kind regards,
ni le
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
–
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.
For more options, visit https://groups.google.com/d/optout.