Search found 63 matches

by dirkse
3 days ago
Forum: Modeling
Topic: Writing model tests - best practices
Replies: 1
Views: 82

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
6 days ago
Forum: Syntax
Topic: How to compare the two parameters
Replies: 6
Views: 131

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
1 week ago
Forum: Tools
Topic: Read from Excel running in cluster environment
Replies: 3
Views: 116

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
1 week ago
Forum: Modeling
Topic: Integer cut
Replies: 7
Views: 128

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
1 week ago
Forum: Modeling
Topic: Integer cut
Replies: 7
Views: 128

Re: Integer cut

Oops, here's the cutting.gms file.
by dirkse
1 week ago
Forum: Modeling
Topic: Integer cut
Replies: 7
Views: 128

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
2 weeks ago
Forum: Modeling
Topic: Considering initial conditions/values in temporal constraints
Replies: 2
Views: 53

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
2 months ago
Forum: Announcements
Topic: GAMS Distribution 27.1.0 Announcement
Replies: 3
Views: 498

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
2 months ago
Forum: Syntax
Topic: Difference between 'equilibrium vi' and 'vi' in EMP
Replies: 1
Views: 187

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,...
by dirkse
2 months ago
Forum: Archive Google Group
Topic: Is there standard normal cumulative distribution function in GAMS?
Replies: 2
Views: 406

Re: Is there standard normal cumulative distribution function in GAMS?

Linkho,

A search for "standard normal" in the GAMS User's Guide at

https://www.gams.com/latest/docs/search.html

gives this page, which mentions the errorf function:

https://www.gams.com/latest/docs/UG_Parameters.html

-Steve