Search found 645 matches

by bussieck
2 weeks ago
Forum: Solvers
Topic: CPLEX/Benders with LP problem
Replies: 3
Views: 369

Re: CPLEX/Benders with LP problem

If you Cplex log contains a header line telling you about the number of optimality andf feasibility cuts, I would say yes:

Code: Select all

      It    Primal bound      Dual bound   #ocuts   #fcuts    Itcnt     Time
--Michael
by bussieck
2 weeks ago
Forum: Solvers
Topic: CPLEX/Benders with LP problem
Replies: 3
Views: 369

Re: CPLEX/Benders with LP problem

The Cplex Benders has been designed for MIP and that's why Cplex does not offer any dual solution when an LP is solved with Benders. The GAMS/Cplex link tries to get the duals anyway (it might not know that you solved via Benders) and hence you get an error message from this call "CPLEX Error 1217: ...
by bussieck
2 weeks ago
Forum: Solvers
Topic: LP convergence plot using CPLEX
Replies: 1
Views: 242

Re: LP convergence plot using CPLEX

You truly need this for LP? Makes little to no sense to me. For MIP this makes some sense. GAMS has the solveTrace facility to capture the primal and dual bounds for a MI(NL)P, see https://www.gams.com/36/docs/UG_SolverU ... SOLVETRACE.

-Michael
by bussieck
3 weeks ago
Forum: Modeling
Topic: Calling another GAMS code during execution
Replies: 7
Views: 623

Re: Calling another GAMS code during execution

I suggest to download a recent GAMS version. The .checkErrorLevel is not essential (and there are other ways to see that the GAMS run succeeded), but there might be other things that I used in the models that are newer than what you have installed. Try to always work with recent software.

-Michael
by bussieck
3 weeks ago
Forum: Modeling
Topic: Calling another GAMS code during execution
Replies: 7
Views: 623

Re: Calling another GAMS code during execution

Hi, Please find attached the modified GAMS models and the new "driver" new2.gms. New2.gms calls the different GAMS programs iteratively. Since the first program of Opt and Dis are different from the others, new2.gms calls these explicitly. I changed these also somewhat, so they are attached here aga...
by bussieck
3 weeks ago
Forum: Modeling
Topic: Unknown error when creating a new variable
Replies: 4
Views: 364

Re: Unknown error when creating a new variable

Although i just erased the SNOPT part because i couldn't add Baron or other solver to the code, how can i do that? Not sure what you mean. Just change "option nlp=baron;" (or any of the other code). BARON has been part of the GAMS system for 20 years now. You might need a license. Contact you sales...
by bussieck
3 weeks ago
Forum: Modeling
Topic: Setting equation limits
Replies: 1
Views: 233

Re: Setting equation limits

This is a classical ranged constraint. GAMS (and most solvers) do not support this. If you want to reuse the code for the expression you can turn it into a macro $macro con1Expr(r) ((tds(r) * 0.14) / (vcPower((pf(r) / (f(r)* cti(r))),0.02) - 1)) con1(r).. con1Expr(r) =g= 0.2; con2(r).. con1Expr(r) =...
by bussieck
3 weeks ago
Forum: Modeling
Topic: Unknown error when creating a new variable
Replies: 4
Views: 364

Re: Unknown error when creating a new variable

SNOPT is a local solver and gets stuck in bad points of your non-convex model. This is a good case for a global solver, like Antigone, Baron, Lindo, or Scip. With that we can easily solve the model: S O L V E S U M M A R Y MODEL aguapotable OBJECTIVE apot TYPE NLP DIRECTION MINIMIZE SOLVER BARON FRO...
by bussieck
3 weeks ago
Forum: Modeling
Topic: Calling another GAMS code during execution
Replies: 7
Views: 623

Re: Calling another GAMS code during execution

Beyond what I already wrote there is little I can do. If you share your code and annotate the various inputs and output, then perhaps I can add some code to make it more obvious.

-Michael