Search found 84 matches

by dirkse
2 months ago
Forum: Modeling
Topic: maximum and minimum value
Replies: 3
Views: 169

Re: maximum and minimum value

Steffen, In your model you will always have non-unique solutions. For any solution, you can just add some arbitrary positive amount to both Market_Purchase_Quantity and Market_Sell_Quantity and you'll also get a solution. What is perhaps unique about the solution is the difference between these two:...
by dirkse
2 months ago
Forum: Modeling
Topic: Writing model tests - best practices
Replies: 4
Views: 346

Re: Writing model tests - best practices

Chris, Your note struck a chord with me. Here at GAMS we also struggle with how best to handle developments and changes in our code. From your note it sounds like the tests are run manually, via a user using the GUI, with the "so called batch file" a sort of recipe. This does indeed sound very time ...
by dirkse
3 months ago
Forum: Syntax
Topic: How to compare the two parameters
Replies: 7
Views: 381

Re: How to compare the two parameters

Lucas, If you want to do this for many parameters, you could add an index and put all the parameters into a larger parameter. For example: set i/1*5/; parameters a(i) /1 1,2 0,3 1,4 0,5 0/ b(i) /1 0,2 1,3 1,4 0,5 0/ c(i) /1 1,2 0,3 1,4 0,5 0/ d(i) /1 1,2 0,3 1,4 0,5 1/ e(i) /1 1,2 1,3 1,4 0,5 1/ ; s...
by dirkse
3 months ago
Forum: Tools
Topic: Read from Excel running in cluster environment
Replies: 3
Views: 533

Re: Read from Excel running in cluster environment

<t>You mention running in a cluster, but that could mean many things. Windows or Linux? Will you run this as a batch job or do you want to use a GUI?<br/> <br/> One clear advantage of running from a command line: it always works, regardless of the environment. So you can get your stuff running on th...
by dirkse
3 months ago
Forum: Modeling
Topic: Integer cut
Replies: 7
Views: 345

Re: Integer cut

The cut equation you have: cut(kk,i,j,ii,jj)$(report1(kk,i,j) and report2(kk,ii,jj)).. y(i,j) + y(ii,jj) =l= 1; does not work. For example, if you had an all-zero previous solution, the above constraint would not cut it off. The formulation in my GAMS file cutting.gms is, IMHO, much simpler. I belie...
by dirkse
3 months ago
Forum: Modeling
Topic: Integer cut
Replies: 7
Views: 345

Re: Integer cut

Oops, here's the cutting.gms file.
by dirkse
3 months ago
Forum: Modeling
Topic: Integer cut
Replies: 7
Views: 345

Re: Integer cut

Rofice, You have a model with binary variables, so the cuts are pretty easy. It is a bit messier with integer variables. Essentially, for a given solution xbar(i), you can make sure that solution is not repeated by counting the differences between xbar and x and bounding this below by 1: sum{i s.t. ...
by dirkse
3 months ago
Forum: Modeling
Topic: Considering initial conditions/values in temporal constraints
Replies: 2
Views: 140

Re: Considering initial conditions/values in temporal constraints

You can also use the technique used in the ramsey model in the model library. The link is below. This model is quite small and illustrates how to use subsets tfirst and tlast to handle the boundary times. It uses a lead to avoid an equation for tfirst: kk(t+1).. k(t+1) =e= k(t) + i(t); https://www.g...
by dirkse
5 months ago
Forum: Announcements
Topic: GAMS Distribution 27.1.0 Announcement
Replies: 3
Views: 1104

Re: GAMS Distribution 27.1.0 Announcement

Sounds like a virus checker to me. The solution in this case is to first update your virus checker and see if that helps - maybe somebody reported this already. If not, you should report this false positive to the provider of your virus checker. If they are any good, they will update some virus defi...
by dirkse
5 months ago
Forum: Syntax
Topic: Difference between 'equilibrium vi' and 'vi' in EMP
Replies: 1
Views: 279

Re: Difference between 'equilibrium vi' and 'vi' in EMP

Hello, An equilibrium model is a collection of agent models, where each agent controls a subset of the variables. If agent A controls x, then agents B and C treat x as a constant, but of course it can and will change as agent A chooses. The models for the different agents can be a combination of VI,...