Search found 1033 matches

by bussieck
7 months ago
Forum: Syntax
Topic: Change set values
Replies: 2
Views: 5627

Re: Change set values

Make "set li /li0*li40/;" and then a dynamic "set lirun(li);". Declare all symbols over li but when you use the symbol index over lirun. Now first you assign only li4 to lirun (lirun('li4')=yes; solve ..." and then you solve for all li: lirun(li) = yes; solve ...". -Mic...
by bussieck
7 months ago
Forum: Syntax
Topic: the uncertain wrong of minimizing
Replies: 6
Views: 9705

Re: the uncertain wrong of minimizing

The model is indeed nonconvex and depending on the starting point (set by bounds) you can get better solutions even if you make the feasible space smaller. Better is to use a global solver, e.g. BARON. In order to make it work okay I had to percolate the bounds of Hratio to H. With that BARON proves...
by bussieck
7 months ago
Forum: Modeling
Topic: resolving a pareto function
Replies: 2
Views: 5452

Re: resolving a pareto function

RZoro95, have a look at the GAMS model at qmeanvar (https://www.gams.com/latest/gamslib_ml/ ... anvar.html) that demonstrates how to solve for extremes of lambda and for points in between for the famous portfolio selection problem.

-Michael
by bussieck
7 months ago
Forum: Modeling
Topic: Logical constraints
Replies: 1
Views: 5237

Re: Logical constraints

There are plenty of questions like this already in the forum. Just search for logic expression. -Michael
by bussieck
7 months ago
Forum: Modeling
Topic: SOLVE from line 689 ABORTED, EXECERROR = 1
Replies: 2
Views: 5583

Re: SOLVE from line 689 ABORTED, EXECERROR = 1

You are using MCP to solve your model. MCP models need to be square. GAMS tells you (if you look careful at the lst file) that the model is not square: **** Counts do not match Single equations in unmatched =E= blocks 2492 Unmatched single free variables 2575 Then GAMS lists the unmatches equations ...
by bussieck
7 months ago
Forum: Modeling
Topic: MCP in a loop results in infeasible solutions
Replies: 2
Views: 5354

Re: MCP in a loop results in infeasible solutions

Usually, solvers react to bRatio (see https://www.gams.com/latest/docs/UG_GamsCall.html#GAMSAObratio) but this does not help here. I unloaded an initial solution via "execute_unload 'startpoint';" just before the loop and inside the loop I did a "execute_loadpoint 'startpoint';" ...
by bussieck
7 months ago
Forum: Syntax
Topic: the uncertain wrong of minimizing
Replies: 6
Views: 9705

Re: the uncertain wrong of minimizing

Jim, Don't put your code in a regular text. The topic editor gives you code markdown to put code in mono-spaced font. This way, the formatting of table sam survives and we know where what number goes. BTW, this might all be related to non-convexity. But without running the model it's hard to say. -M...
by bussieck
7 months ago
Forum: Modeling
Topic: How to obtain the marginal of equality constraints in nlp
Replies: 1
Views: 4271

Re: How to obtain the marginal of equality constraints in nlp

Conopt delivers fine marginals. Nothing wrong with 0 or EPS marginals. If you want more detailed information, you might want to share your model.

-Michael
by bussieck
7 months ago
Forum: Modeling
Topic: Modeling Question
Replies: 1
Views: 3440

Re: Modeling Question

That is super straight forward equation and its realization in GAMS is

Code: Select all

$set M 5
$set F 3
$set L 7
set m / 1*%M%/, f / 1*%F%/, l / 1*%L% /, ps / 1*2 /;
variable z(l,m), x(f,l), conv(ps);
equation e(l);
e(l).. sum(m, z(l,m)) =e= sum(f, x(f,l))*prod(ps, conv(ps));
-Michael
by bussieck
7 months ago
Forum: API
Topic: Python API ignores default Solver?
Replies: 4
Views: 5556

Re: Python API ignores default Solver?

There are many ways to change options in GAMS, changing optgams.def is not one of them. Please read this part of the docs: https://www.gams.com/44/docs/UG_GamsCal ... Precedence

-Michael