Search found 8 matches

by nechiforv
1 year ago
Forum: API
Topic: GAMS parameter initialisation as Modifier in Python GAMSModelInstance
Replies: 2
Views: 5051

GAMS parameter initialisation as Modifier in Python GAMSModelInstance

Dear GAMS community, I am encountering some difficulties trying to run an MCP model through GAMSModelInstance. In the model, among other things, I have two equations of the type: EQ1.. X =E= x0 + flag*X_SLACK EQ2.. Y =E= y0 + (1-flag)*Y_SLACK where flag is a parameter that take 0 or 1 values, and x0...
by nechiforv
1 year ago
Forum: API
Topic: GAMS Engine with GAMSModelInstance
Replies: 2
Views: 8526

Re: GAMS Engine with GAMSModelInstance

Dear Michael,

Thank you for your detailed reply. Very useful, as always.

Victor
by nechiforv
1 year ago
Forum: API
Topic: GAMS Engine with GAMSModelInstance
Replies: 2
Views: 8526

GAMS Engine with GAMSModelInstance

Dear GAMS community, I have a question that is rather broad but hoping to get some clarifications. I would want to quantify the benefit with GAMS Engine of being able to run multiple model solves in parallel. This could potentially allow many more parallel runs than the number of cores one would hav...
by nechiforv
2 years ago
Forum: API
Topic: Python API - model instance with MCP
Replies: 2
Views: 4600

Re: Python API - model instance with MCP

Hi Michael,

Thank you for the explanations, very useful.

Kind regards,
Victor
by nechiforv
2 years ago
Forum: API
Topic: Python API - model instance with MCP
Replies: 2
Views: 4600

Python API - model instance with MCP

Dear GAMS experts, I am trying to figure out whether the use of the Python API GAMSModelInstance for multithreading would be possible for an MCP GAMS model. From the API intro I see that only a few solvers take full advantage of solving models through model instances, but could not find anything on ...
by nechiforv
4 years ago
Forum: API
Topic: Removing .dat files for Python GamsModelInstace use
Replies: 4
Views: 4775

Re: Removing .dat files for Python GamsModelInstace use

Hi Michael,

Thank you for the suggestions.
Indeed, reinitialising the model instance only when the memory gets full significantly reduces the number of .dat folders generated.

Best wishes,
Victor
by nechiforv
4 years ago
Forum: API
Topic: Removing .dat files for Python GamsModelInstace use
Replies: 4
Views: 4775

Re: Removing .dat files for Python GamsModelInstace use

Hi Michael, Thank you for these initial thoughts. I am posting a dummy version below. The GAMS model is defined as a CNSModel object. The model is thus first initialised with a workspace, checkpoint and options. Then a model instance using GamsModelIinstance is initialised using initialise_instance(...
by nechiforv
4 years ago
Forum: API
Topic: Removing .dat files for Python GamsModelInstace use
Replies: 4
Views: 4775

Removing .dat files for Python GamsModelInstace use

Hello, I am running a GAMS CNS model using the Python API GamsModelInstance. The model is run over 100k times and, from a certain point, my RAM memory runs out. The strategy to avoid this is to delete the model instance (using __del__) whenever possible and then recreate it. While the memory issue s...