Search found 344 matches

by bussieck
3 months ago
Forum: Modeling
Topic: Setting Specific Variable Values
Replies: 2
Views: 190

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
3 months ago
Forum: Syntax
Topic: Find & change in parameter
Replies: 2
Views: 264

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

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

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 months ago
Forum: Modeling
Topic: if statement problem in inventory routing model
Replies: 1
Views: 235

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 months ago
Forum: Modeling
Topic: IEEE 6-bus system modeling
Replies: 1
Views: 285

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
by bussieck
4 months ago
Forum: Modeling
Topic: Iterative modeling GAMS
Replies: 1
Views: 204

Re: Iterative modeling GAMS

Not sure if you were looking for this solution, but you can just use a for loop around your solve that iterates a range of gama values:

Code: Select all

for (gamax=0 to 5 by 0.5,
gama = gamax;
Solve  Rmodel using LP Minimizing eff;
...
)
The entire model is attached.

-Michael
by bussieck
4 months ago
Forum: Modeling
Topic: Load Flow of 33 buses distribution system, current in between buses equal zero
Replies: 1
Views: 179

Re: Load Flow of 33 buses distribution system, current in between buses equal zero

You might want to attached a working model, so we can see what is going on. But most likely, your model was reported infeasible and that's why you don't get meaningful values in your reported variables.

-Michael
by bussieck
4 months ago
Forum: Modeling
Topic: stochastic programming
Replies: 1
Views: 247

Re: stochastic programming

Have slack variables with high costs to make the second stage problem always feasible.

-Michael
by bussieck
4 months ago
Forum: Syntax
Topic: Maximizing a maximum
Replies: 1
Views: 231

Re: Maximizing a maximum

What about, eq(t,i).. power(t)=g=p(i,t) If the model wants to have minimum of power (because of cost or so) the equality for for i will happen automatically. If that's not the case, you need to introduce binary variables that make sure at least one of the constraints is fulfilled with equality. Thes...