Search found 14 matches

by diabolik
1 year ago
Forum: Modeling
Topic: Obtaining Suboptimal Solutions with Benders
Replies: 1
Views: 1326

Re: Obtaining Suboptimal Solutions with Benders

What really interesting is, it finds suboptimal solutions only for some instances, not all the time. The runs for a dataset is given below. The upper ones does not involve any enforcing constraints for a variable to take a certain value. The lower one involves a single variable to take a specific va...
by diabolik
1 year ago
Forum: Modeling
Topic: Obtaining Suboptimal Solutions with Benders
Replies: 1
Views: 1326

Obtaining Suboptimal Solutions with Benders

Hello everyone, I have the following Benders code for a maximization problem on GAMS. It happens that sometimes GAMS give an suboptimal solution even though it should find the exact solution, since no heuristics exist and Benders tolerance (BdTol= Upper Bound - Lower Bound) is 0. I ensure that both ...
by diabolik
1 year ago
Forum: Modeling
Topic: Loop Function and Parameters Based on a Distribution
Replies: 6
Views: 1908

Re: Loop Function and Parameters Based on a Distribution

Hey, this is the model. The issue I am facing is finding the optimal solution gets increasingly slower in each iteration. While single iteration takes like 1 minute, 100 iteration takes 9-10 hours. execseed = 86358; Sets j facility points /1*200/ n iteration number/1*100/; parameter c(j) ’Samples fr...
by diabolik
1 year ago
Forum: Modeling
Topic: Loop Function and Parameters Based on a Distribution
Replies: 6
Views: 1908

Re: Loop Function and Parameters Based on a Distribution

Thank you so much! It works.

However, in each iteration GAMS finds the solution slower. Do you think it is normal? Is there anything I can do about it?
by diabolik
1 year ago
Forum: Modeling
Topic: Loop Function and Parameters Based on a Distribution
Replies: 6
Views: 1908

Re: Loop Function and Parameters Based on a Distribution

Update on the question. I was able to solve regeneration of variables in each iteration by adding "execseed = 1+gmillisec(jnow);" to my code. Final version looks as follows: execseed = 1+gmillisec(jnow); Sets j facility points /1*200/ n iteration number/1*10/; parameter c(j) ’Samples from ...
by diabolik
1 year ago
Forum: Modeling
Topic: Loop Function and Parameters Based on a Distribution
Replies: 6
Views: 1908

Loop Function and Parameters Based on a Distribution

Hello everyone, I am trying to solve a single model multiple times with different parameters. My parameters are c(j) and d(j). Their distributions are UNI(50,200) and UNI(20,200). In each iteration, I want to generate a value between those given values for each parameter based on uniform distributio...
by diabolik
1 year ago
Forum: Modeling
Topic: GAMS Loops ends early
Replies: 1
Views: 1152

GAMS Loops ends early

Hello everyone, I am trying a loop, however it keeps ending without satisfying the condition abs(UB/LB) > BdTol. I want algorithm to stop when UB=LB, however it always ends priorly. Do you see anything wrong with the code? loop(iter$(abs(UB/LB) > BdTol), solve subproblem maximizing z using lp; abort...
by diabolik
1 year ago
Forum: Modeling
Topic: Obtaining the extreme directions for LP in GAMS
Replies: 1
Views: 1092

Obtaining the extreme directions for LP in GAMS

Hello everyone!

Is it possible to obtain all extreme directions of a Linear Program in GAMS by using any of its solvers?

Best wishes.
by diabolik
1 year ago
Forum: Modeling
Topic: Same Model for Different Data
Replies: 1
Views: 3927

Same Model for Different Data

Hey, I have a problem where I need to solve a model for each row of an Excel file. The model for row 1 is as follows: Sets i sample number /1*1817/ j criterion /1*17/; alias(i, k); Table a(k,j) $call=xls2gms r=a1:r1818 i=calculations.xls o=parc.inc $include parc.inc ; Variables w(i,j) z objective; P...
by diabolik
1 year ago
Forum: Modeling
Topic: Power, rPower, Sum Functions
Replies: 7
Views: 3125

Re: Power, rPower, Sum Functions

Sure, I'll be waiting for your response :)
Manassaldi wrote: 1 year ago Hi, when I can I will observe what you shared. But, remember that it is an NLP problem so the equations shown by the lst file are a linear approximation of them.
Best!