Search found 7 matches

by Freddy
5 months ago
Forum: GAMS MIRO
Topic: Is it possible to pass on miro input to a $call command?
Replies: 2
Views: 583

Re: Is it possible to pass on miro input to a $call command?

Hello, Jason, MIRO currently assigns values to GAMS parameters at the end of the compilation phase (right before the start of the execution phase). Therefore, Input is always 1 at the time your expression is evaluated. Admittedly, this behavior is not entirely intuitive and will most likely change b...
by Freddy
5 months ago
Forum: Tools
Topic: Export report summary to GDX
Replies: 2
Views: 433

Re: Export report summary to GDX

Hi,

if I understand you correctly, what you are looking for are the model attributes solvestat and modelstat. Use these in combination with the GAMS programming flow control features and you can write your own custom logic when and what to export.

Best,
Freddy
by Freddy
11 months ago
Forum: Modeling
Topic: Production Batch Constraint
Replies: 3
Views: 2278

Re: Production Batch Constraint

Sure, let's take the following equation: vincolo(forn) .. sum(pp, k(pp,forn)) =l= numeropp(forn); and add a non-negative slack variable slack(forn) to this equation as follows: vincolo(forn) .. sum(pp, k(pp,forn)) =l= numeropp(forn) + slack(forn); Subtract the slack variables (potentially multiplied...
by Freddy
11 months ago
Forum: Modeling
Topic: Production Batch Constraint
Replies: 3
Views: 2278

Re: Production Batch Constraint

Hello Leonardo, if the solver reports "integer infeasible" then there is no feasible solution for the data you have provided. However, the model being infeasible does not mean the problem you want to solve is infeasible. You might have just modelled the reality too restrictive. One way to avoid havi...
by Freddy
1 year ago
Forum: API
Topic: Python Embedded in Gams - Import Python Package
Replies: 13
Views: 3128

Re: Python Embedded in Gams - Import Python Package

Yes you can. Either install the package manually by navigating to your GMSPython folder (i.e. <GAMSRoot>/GMSPython) and using the pip executable (python package management system). This tool should be located in a folder "Scripts" or something similar. (you can install pandas with pip with the comma...
by Freddy
1 year ago
Forum: Syntax
Topic: Define dynamic set using embedded code facility
Replies: 4
Views: 618

Re: Define dynamic set using embedded code facility

So the problem here is that you are using the ord operator on the dynamic set 'sub_t'. Please refer to: https://www.gams.com/latest/docs/UG_OrderedSets.html#UG_OrderedSets_OrdAndCard for more information about how to use the ord operator. I have changed your code, so it executes properly now. If thi...
by Freddy
1 year ago
Forum: Syntax
Topic: Define dynamic set using embedded code facility
Replies: 4
Views: 618

Re: Define dynamic set using embedded code facility

Hi, I am not quite sure whether this is really what you mean to do, but I guess using embeddedCode in this situation is a bit of an overkill. Here is some GAMS code that does what I think you want to achieve: Sets i products / i0*i50 / j suppliers / j0*j50 / t time periods / t0*t50 / sub_j(j) dynami...