Search found 13 matches

by cnbrksnr
2 years ago
Forum: Syntax
Topic: How to exclude a value
Replies: 1
Views: 1766

Re: How to exclude a value

Try this:

Balance( i , j )$(j.pos > 1).. A(i, j-1) + B(i,j) =e= D(i,j) + E(i,j);
by cnbrksnr
2 years ago
Forum: Syntax
Topic: CPLEX - Benders' iteration count to parameter
Replies: 1
Views: 3393

Re: CPLEX - Benders' iteration count to parameter

For the record:

I have found a solution by analyzing the .log file using MATLAB. I utilized the fact that in the .log file, the iteration count is always displayed at two lines above of the text "--- LP status (1): optimal."
by cnbrksnr
2 years ago
Forum: Syntax
Topic: Problem solving error 149
Replies: 4
Views: 3567

Re: Problem solving error 149

You need to include all of the equations in the solve statement.

Try

model problema1 /all/;
by cnbrksnr
2 years ago
Forum: Syntax
Topic: CPLEX - Benders' iteration count to parameter
Replies: 1
Views: 3393

CPLEX - Benders' iteration count to parameter

Dear helpful GAMS community, I am using CPLEX Benders algorithm. I want to record the number of Benders iterations to a parameter. I can read it from the display but since I will be running many different problems, I have to write it to a GAMS parameter to keep track of everything. Can I do that? Th...
by cnbrksnr
2 years ago
Forum: Solvers
Topic: MOSEK: Problem becomes infeasible when I change the objective function
Replies: 4
Views: 3774

Re: MOSEK: Problem becomes infeasible when I change the objective function

Hello Steve,


I had turned off the pre-solver. I turned it on now, and the result returned optimal. I think I am all good.

Thanks for the tips.
by cnbrksnr
2 years ago
Forum: Syntax
Topic: Equating two sets of variables
Replies: 3
Views: 3235

Re: Equating two sets of variables

Thank you Atharv and Steve!
by cnbrksnr
2 years ago
Forum: Solvers
Topic: MOSEK: Problem becomes infeasible when I change the objective function
Replies: 4
Views: 3774

Re: MOSEK: Problem becomes infeasible when I change the objective function

Hello Steve,

Thanks for your reply. I didn't know bounding the objective leads to adverse effects. I am using GAMS 28 due to my licence, on a Windows. The solution returns infeasible for me. Could this be a bug? If so, how can I rectify the issue?

Cheers
by cnbrksnr
2 years ago
Forum: Solvers
Topic: Error 65!!!
Replies: 3
Views: 4183

Re: Error 65!!!

Hi!!! Firstly, this is not an LP, it is a mixed-integer LP. You should change the "solve" statement accordingly. Secondly, the state-of-charge equation is only defined for h > h1. So, replace "Hourly_charge1" equation as below: Hourly_charge1(h,b)$(h.pos > 1).. Ehb(h,b) =e= Ehb(h...
by cnbrksnr
2 years ago
Forum: Syntax
Topic: Equating two sets of variables
Replies: 3
Views: 3235

Equating two sets of variables

Hello everyone, Suppose I have two sets: n1 and n2, where card(n1) > card(n2). And we have two set of variables x(n1) and y(n2). Furthermore, I have a set nn(n1) (i.e., nn is a subset of n1), in which the number of yes's is equal to card(n2). I want to define the set of constraints x(nn) = y(n2). In...
by cnbrksnr
2 years ago
Forum: Solvers
Topic: MOSEK: Problem becomes infeasible when I change the objective function
Replies: 4
Views: 3774

MOSEK: Problem becomes infeasible when I change the objective function

Hello all, I have a moderate-sized LP with ~13k variables and ~25k constraints. When I try to solve using MOSEK, it says that the problem is primal infeasible. By construction, I know a feasible solution exists. Also, when I set the objective function to a constant and then solve the problem, it tur...