Search found 340 matches

by bussieck
1 month ago
Forum: API
Topic: Read a MPS/LP file in Java
Replies: 2
Views: 256

Re: Read a MPS/LP file in Java

You can run the mps2gms utility (via some Java system call) to turn the MPS into a GAMS file. This GAMS file you can run with GAMSJob.run.

-Michael
by bussieck
2 months ago
Forum: Announcements
Topic: Job opportunity in the European Commission in Seville (Spain)
Replies: 1
Views: 353

Re: Job opportunity in the European Commission in Seville (Spain)

New deadline: Deadline: 4 July 2019 23:59 Brussels time.
by bussieck
2 months ago
Forum: Tools
Topic: Gams Log reading due to calculatin
Replies: 1
Views: 425

Re: Gams Log reading due to calculatin

Yes, you can do that. Best thing to do it to have GAMS write to stdout (lo=3) and then you capture the log yourself. We do this in the OO-APIs. For example, in Python the GAMSJob.run method allows to pass in a textwriter that can be interrogated in a different thread.

-Michael
by bussieck
2 months ago
Forum: Tools
Topic: Exit code = 6 / Unable to open output file
Replies: 1
Views: 222

Re: Exit code = 6 / Unable to open output file

Hmmm, unfortunately you did not show enough in the screen shot to see what file GAMS could not access. I guess this is "typical" virus scanner interference. The operating system is made believe the file access is freed but some process (the virus scanner) still holds on to the file and another proce...
by bussieck
2 months ago
Forum: Tools
Topic: Failure to change relative optimality error 1015
Replies: 1
Views: 113

Re: Failure to change relative optimality error 1015

This is a BARON internal message and it seems to indicate that changing a parameter with one of BARON's subsolvers resulted in some issues. I see that you are not using the latest version of GAMS an BARON. I suggested to run this with the latest version and see if the problem persists then please re...
by bussieck
2 months ago
Forum: Modeling
Topic: Linearizing and minimizing an absolute term
Replies: 1
Views: 107

Re: Linearizing and minimizing an absolute term

Your expression is correct but it involves to minimize x which is hard when you try to just substitute |.| in a model. The absmip model (https://www.gams.com/latest/gamslib_ml/libhtml/gamslib_absmip.html) shows how to reformulate |.| with the help of a binary variable. You will need to have the some...
by bussieck
2 months ago
Forum: Modeling
Topic: Setting Specific Variable Values
Replies: 2
Views: 129

Re: Setting Specific Variable Values

This has little to do with GAMS. Write down your MINLP with regular math constructs then the implementation in GAMS will be easy. Perhaps you should look into some modeling book (e.g. HP Williams, cited a lot by me in this forum). A short hint: have a set of selections set s / s1*s4 / with sizes par...
by bussieck
2 months ago
Forum: Syntax
Topic: Find & change in parameter
Replies: 2
Views: 188

Re: Find & change in parameter

You can build up a set pos(p,x,a) that gives you the location a (in your vector) for the xth occurrence of the number p and with that you easily access the location of the ith location of a value. If you change c then the set pos becomes outdated and needs to be recalculated. So I you you just acces...
by bussieck
2 months ago
Forum: Modeling
Topic: Modeling of uncertainty through scenarios and storing in xlsx files
Replies: 1
Views: 224

Re: Modeling of uncertainty through scenarios and storing in xlsx files

If you look at the GDX file symbol sc generated by the gdxxw call you see what is going on (the set labels are your scenario parameters). You need to supply in Excel a column with scenario label names. I also had to modify the the gdxxrw command. The put_utility allows you to manage the writing of r...
by bussieck
2 months ago
Forum: Modeling
Topic: Nonlinear constraints in MINLP model
Replies: 2
Views: 214

Re: Nonlinear constraints in MINLP model

Without further knowledge about the type of variables, the size of n etc it's hard to recommend anything. The constraints are nonlinear and while there are ways to linearize something like this (e.g. piecewise linear approximation) it's hard to suggest something useful without more details.

-Michael