Search found 78 matches

by Fred
5 days ago
Forum: Syntax
Topic: CHOOSING A SPECIFIC OPTIMAL SOLUTION FROM A PARETO FRONT GENERATED IN GAMS
Replies: 2
Views: 99

Re: CHOOSING A SPECIFIC OPTIMAL SOLUTION FROM A PARETO FRONT GENERATED IN GAMS

Hi, You could store the values of x1 and x2 in a parameter, similar to how it is done for the objective values in the example, e.g. loop(counter, E = (ranges('OF2max') - ranges('OF2min'))*(ord(counter) - 1)/(card(counter) - 1) + ranges('OF2min'); of2.lo = E; solve pareto1 using nlp maximizing of1; r...
by Fred
1 month ago
Forum: Modeling
Topic: Equations with different dimensions
Replies: 2
Views: 134

Re: Equations with different dimensions

Hi,

Not sure if I really understood the problem but to me it seems that you should just drop the j index for A and should be good:

Code: Select all

eq1(i).. A(i) =e= x(i)+y(i);
eq2(i,j).. B(i,j) =e= A(i)+c(i,j);
I hope this helps!

Best,
Fred
by Fred
1 month ago
Forum: Modeling
Topic: $Setglobal using if statement
Replies: 2
Views: 112

Re: $Setglobal using if statement

Hi, You are mixing compile time statements (like $setglobal) with execution time commands (like if/else). GAMS is a two pass system with a compile time phase and an execution time phase (see https://www.gams.com/latest/docs/UG_GamsCall.html#UG_GamsCall_TwoPass). $commands like setglobal are carried ...
by Fred
1 month ago
Forum: Solvers
Topic: Problem with 'rtnwma' and 'rtnwmi'
Replies: 1
Views: 359

Re: Problem with 'rtnwma' and 'rtnwmi'

Hi, If no matter how you set the limits of the feasibility tolerance, the model remains infeasible, the conclusion may be that it really is infeasible. You probably won't change that via solver options but have to work on the model and/or data. The Conopt solver manual has some hints on good model f...
by Fred
1 month ago
Forum: Modeling
Topic: Possible problems with MIP-CPLEX
Replies: 3
Views: 170

Re: Possible problems with MIP-CPLEX

Hi Ferrib, People (including myself) often "know" that there is a feasible solution to their problem and in the end it turns out that there is none because of some model or data mistake... Finding a feasible solution can take forever but at least CPLEX should not classify a feasible model as infeasi...
by Fred
1 month ago
Forum: Modeling
Topic: EXECERROR, division by zero (0)
Replies: 2
Views: 100

Re: EXECERROR, division by zero (0)

Hi, line 920 reads as follows: ZKMD(m,pd,t,ni)$tkp(t,pd)= capitalcost0(t)* (XCOMD(m,pd,t,ni)/capacity0(t))**capacity_exponent; Since there is only one division in this line, the problem mst be caused by capacity0(t). Lookung at the code it turns out that set t has 7 elements storage sugar_milling bi...
by Fred
1 month ago
Forum: Modeling
Topic: Possible problems with MIP-CPLEX
Replies: 3
Views: 170

Re: Possible problems with MIP-CPLEX

Hi, A good way to go about analyzing infeasibilities is to provide a "feasible" solution to the problem (you claim to have such a feasible point). To do so, you can manually set the variable level values (x.l(i,j) = ...) and then generate the model with a full equation listing (option limrow=1e9;) T...
by Fred
1 month ago
Forum: Solvers
Topic: MIP Start with CPLEX from a file
Replies: 26
Views: 3490

Re: MIP Start with CPLEX from a file

Hi, While the more elaborate description compared to the GAMS/CPLEX solver manual (https://www.gams.com/latest/docs/S_CPLEX.html#CPLEXmipstart) may be informative, I find your post rather confusing than helpful. There is an offset between the value of the GAMS/CPLEX option mipstart and the "real" CP...
by Fred
4 months ago
Forum: Archive Google Group
Topic: epgap=0
Replies: 4
Views: 847

Re: epgap=0

Richard, Just change your code to model my_model1/obj1,c1,c2/; my_model1.Optfile =1; file opts cplex option file/ cplex.opt /; putclose opts /'epgap=0' /'epagap=0'; solve my_model1 using mip minimizing z; [...] model my_model2/obj2,c3,c4/;; my_model2.Optfile =1; putclose opts /'epgap=0' /'epagap=0';...
by Fred
4 months ago
Forum: Modeling
Topic: Error in reading 4 dimensional data from EXCEL to GAMS
Replies: 2
Views: 272

Re: Error in reading 4 dimensional data from EXCEL to GAMS

Hi, I am surprised that you claim to get the shown gdx file. Actually, for the Excel file shown in the screenshot, your GDXXRW call should produce a couple of errors and not create a GDX file at all: **** There were 2 duplicate entries for symbol a 1: Refinery 1 2: Refinery 2 **** There were 2 dupli...