Search found 108 matches

by cladelpino
6 years ago
Forum: Syntax
Topic: remove element from a set
Replies: 2
Views: 4860

Re: remove element from a set

Hi, in main file: *You just comment or uncomment according to your needs *$include SetDefWithA.gms $include SetDefWithoutA.gms *$include SomeOtherSetDef.gms And you can have: SetDefWithA.gms Set G /'A','B','C'/ G1(G) /'A','B'/ G2(G) /'A','C'/; SetDefWithoutA.gms Set G /'B','C'/ G1(G) /'B'/ G2(G) /'C...
by cladelpino
6 years ago
Forum: Syntax
Topic: Especify a variable value
Replies: 1
Views: 2595

Re: Especify a variable value

Hi, perhaps this correct example will help you: set t /t0*t100/; set w /w1*w4/; set j /j1*j10/; set o /o1*o10/; variables x,y,z; equations r3,r4,r5,r6; equation fobj; fobj.. z=e=x('j1','t2'); R3(t,w)$(ord(t) gt 0 and ord(t) lt 33 and ord(w) eq 1).. sum(j,x(j,t)) =L= sum(o,(y(o,w))); R4(t,w)$(ord(t) ...
by cladelpino
6 years ago
Forum: Syntax
Topic: remove element from a set
Replies: 2
Views: 4860

Re: remove element from a set

Hi, I don't know if it fits your workflow, but, using $include of different set definitions in different files is a possibility that comes to mind. Then you just comment/uncomment the ones you are currently using. This has the advantage that you can make this kind of edits easily with your text edit...
by cladelpino
6 years ago
Forum: Solvers
Topic: Dual infeasible due to empty column
Replies: 1
Views: 5725

Re: Dual infeasible due to empty column

Hi, you have a real problem, not just an artifact generated by presolve. You can see that the primal problem is unbounded. This means the objective function can get "as low as possible" if minimizing or the opposite if maximizing.
by cladelpino
6 years ago
Forum: Tools
Topic: Is there any information stored between runs from the IDE ?
Replies: 0
Views: 3449

Is there any information stored between runs from the IDE ?

So far our understanding has been that no information is stored between two runs fired up from the GAMS IDE. If this is true, every symbol should be initialized in the same way, when comparing two runs. But, we have been able to reproduce a weird behaviour that challenges this understanding: Run 1: ...
by cladelpino
6 years ago
Forum: Modeling
Topic: how to model two positive variables without being positive at the same time
Replies: 1
Views: 3172

Re: how to model two positive variables without being positive at the same time

A quick search turns up this reference, for some cases. https://minds.wisconsin.edu/handle/1793/57916 .

My gut tells me it will be very hard to stay in LP but I haven't really made a deep search.

Good luck !
by cladelpino
6 years ago
Forum: Tools
Topic: 2 scrpits in one window
Replies: 2
Views: 6294

Re: 2 scrpits in one window

Not that I know of, for such tasks I use an external text editor. If you are willing to go that route but want extra support perhaps this is useful https://github.com/lolow/sublime-gams . I haven't tested it yet.
by cladelpino
6 years ago
Forum: API
Topic: Installing Python API
Replies: 7
Views: 13142

Re: Installing Python API

Seems to be working perfectly. Thank you Clemens!
by cladelpino
6 years ago
Forum: Modeling
Topic: Complex expression as intermediate vairable
Replies: 1
Views: 4546

Re: Complex expression as intermediate vairable

Not that I know of. But,

a- CONOPT in fact encourages this https://gams.com/latest/docs/solvers/co ... XPRESSIONS
b- You should experiment if it really affects model solving performance. My guess is it shouldn't in most cases.