Search found 328 matches

by bussieck
10 hours ago
Forum: Tools
Topic: Gams Log reading due to calculatin
Replies: 1
Views: 209

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
10 hours ago
Forum: Tools
Topic: Exit code = 6 / Unable to open output file
Replies: 1
Views: 138

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
10 hours ago
Forum: Tools
Topic: Failure to change relative optimality error 1015
Replies: 1
Views: 35

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
11 hours ago
Forum: Modeling
Topic: Linearizing and minimizing an absolute term
Replies: 1
Views: 30

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
11 hours ago
Forum: Modeling
Topic: Setting Specific Variable Values
Replies: 2
Views: 14

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
11 hours ago
Forum: Syntax
Topic: Find & change in parameter
Replies: 1
Views: 41

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
4 days ago
Forum: Modeling
Topic: Modeling of uncertainty through scenarios and storing in xlsx files
Replies: 1
Views: 135

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
4 days ago
Forum: Modeling
Topic: Nonlinear constraints in MINLP model
Replies: 2
Views: 140

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
by bussieck
4 days ago
Forum: Modeling
Topic: if statement problem in inventory routing model
Replies: 1
Views: 105

Re: if statement problem in inventory routing model

What do you try to accomplish with the statements A.l() = ...? and B() = $()? Are these constraints or what?

-Michael
by bussieck
4 days ago
Forum: Modeling
Topic: IEEE 6-bus system modeling
Replies: 1
Views: 152

Re: IEEE 6-bus system modeling

Where is the problem. Try to put some code in and then we can see if we can help or describe where exactly the problem is.

-Michael