Search found 1047 matches

by bussieck
8 months ago
Forum: Syntax
Topic: Assistance Needed with Correcting Dimension and Operand Errors in Lines 97-101
Replies: 1
Views: 6589

Re: Assistance Needed with Correcting Dimension and Operand Errors in Lines 97-101

The listing file points you nicely to the issue and gives a reasonable explanation "Incompatible operands for relational operator": 95 inventoryBalance(p,s,t).. 96 I(t,p,s) =e= I(t-1,p,s) + X(t,p,s) - sum(s_1$(s_1 = sPrec(p,s) and s_1<>s), X(t-rt(s,s_1),p,s_1)*a(p,s)) - d(t,p,s); **** $148...
by bussieck
8 months ago
Forum: API
Topic: Python API ignores default Solver?
Replies: 4
Views: 6914

Re: Python API ignores default Solver?

The optgams.def file is a file to let e.g. Studio know what options GAMS accepts and what their default values are. The GAMS documentation never had anything on adjusting the file. It is for pure internal use and editing might have some unexpected results.

-Michael
by bussieck
8 months ago
Forum: Syntax
Topic: the uncertain wrong of minimizing
Replies: 6
Views: 12322

Re: the uncertain wrong of minimizing

Why do you expect the ratio to be stable? Many optimization problems are degenerate, i.e. with the same objective function you have many solutions. Which one the solver spits out is a matter of chance. So if you change the input (e.g. different bounds) the solver takes a slightly different path and ...
by bussieck
8 months ago
Forum: Modeling
Topic: Model Inquiry
Replies: 1
Views: 6512

Re: Model Inquiry

The solver tells you the model is infeasible. There are many tools to analyze infeasibility. Infeasibility is a normal state for a mathematical program (besides optimal and unbounded). There are tools (e.g. iis or feasopt) that help you pinpoint the cause for the infeasibility. Search the forum for ...
by bussieck
8 months ago
Forum: Syntax
Topic: Change set values
Replies: 2
Views: 6283

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
8 months ago
Forum: Syntax
Topic: the uncertain wrong of minimizing
Replies: 6
Views: 12322

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
8 months ago
Forum: Modeling
Topic: resolving a pareto function
Replies: 2
Views: 5758

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
8 months ago
Forum: Modeling
Topic: Logical constraints
Replies: 1
Views: 5436

Re: Logical constraints

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

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
8 months ago
Forum: Modeling
Topic: MCP in a loop results in infeasible solutions
Replies: 2
Views: 5580

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';" ...