Search found 372 matches

by Fred
11 months ago
Forum: Modeling
Topic: Error 195,318,409
Replies: 3
Views: 1912

Re: Error 195,318,409

Hi,

The following compiles without any issues.

Code: Select all

Set k  / k1*k3 /;
parameter C(k) physical space required by vehicles k / k1 50, k2 75, k3 100/;
Maybe you can share the code that fails?

best,
Fred
by Fred
1 year ago
Forum: Syntax
Topic: Infeasible solution, no superbasic variables.
Replies: 3
Views: 4557

Re: Infeasible solution, no superbasic variables.

A list of all McCarls newsletters can be found here.

I hope this helps!

Fred
by Fred
1 year ago
Forum: Modeling
Topic: Huge Gap
Replies: 1
Views: 2103

Re: Huge Gap

Hi,

As a first step, you should make sure that you understand to get an objective value of 4.7 with option feasopt. Your model is infeasible. With that said, there is no point in trying to reduce the gap.

I hope this helps!

Fred
by Fred
1 year ago
Forum: Modeling
Topic: cplex error 1217 :no solution exists
Replies: 1
Views: 1149

Re: cplex error 1217 :no solution exists

Your model is infeasible. So there is no feasible point to all the constraint to have specified. When Cplex returns "integer infeasible" a good first step is often to solve the model as RMIP , i.e. solve the resulting LP you get when relaxing integrality requirements for the discrete varia...
by Fred
1 year ago
Forum: Modeling
Topic: Error 149 Uncontrolled set entered as constant
Replies: 1
Views: 1226

Re: Error 149 Uncontrolled set entered as constant

Hi,

you are following the equation from the screesnhot, but that equation makes no sense, because it is not clear where the i in the index of beta comes from. I guess this may have to be moved into the sum over i.

I hope this helps!

Fred
by Fred
1 year ago
Forum: Syntax
Topic: Error 148 y 149
Replies: 2
Views: 1635

Re: Error 148 y 149

Hi, The forum language is English, so I will reply in English. For future posts, please follow the forum rules and be put code into code tags because otherwise e.g. table statements get broken. The first two errors are 62 PBAL.. SUM(G$MAP(G,N), p(G))-BUS(N,'PL')=e=v(N)*SUM(NP,LINE(N,NP,'Y')*v(NP)*co...
by Fred
1 year ago
Forum: Syntax
Topic: Command line Keyword in the gams script
Replies: 4
Views: 4621

Re: Command line Keyword in the gams script

Hi, You can use $ifthen (or its case insensitove variant $iftheni). $if not set month $set month Jan $iftheni %month%==Jan Display "Jan"; $elseIfi %month%== Apr Display "Apr"; $elseIfi %month%==July Display "July"; $elseIfi %month%==Oct Display "October"; $end...
by Fred
1 year ago
Forum: Modeling
Topic: Indexing issue
Replies: 2
Views: 1222

Re: Indexing issue

Hi Marco, If I understand correctly what you want to do, you should not use index t in the domain of variable xMob. Basically what you seem to need is a mapping of the seven elements in set t (each representing 48 hours) to the pairs of days and hours (d,h). You can get this for example as follows: ...
by Fred
1 year ago
Forum: Modeling
Topic: equation
Replies: 1
Views: 968

Re: equation

E.g. as follows. eq(j)$[not sameas(j,'1')].. sum((k,i)$[not sameas(i,j)], X(i,j,k)) =e= 1; But instead of sharing a screenshot that provides no context, I suggest that you follow the forum rules and try to provide executable GAMS code (even if it has errors) that demonstrates where exactly you are s...
by Fred
1 year ago
Forum: Modeling
Topic: By-Product Synergy Model Bugs Declaration
Replies: 1
Views: 979

Re: By-Product Synergy Model Bugs Declaration

Hi, If you need to use x(i,j) and x(j,i), then you should not declare variable x with domain (i,j). If sets i and j both describe subsets of nodes, you can declare a superset of nodes and make i and j subsets of this superset. Then you can declare x over the superset of all nodes and should be good,...