Search found 72 matches
- 5 years ago
- Forum: Modeling
- Topic: Generate Equation and Column Listing without solving
- Replies: 3
- Views: 3192
Re: Generate Equation and Column Listing without solving
I'm also interesting in this issue :idea: After checking the documentation, I know that 'solve' statement takes the role of importing and generating all the equations and columns in the predefined model ( https://www.gams.com/latest/docs/UG_GAMSOutput.html#UG_GAMSOutput_TheEquationListing ). Thus an...
- 5 years ago
- Forum: Modeling
- Topic: HELP! Augmenting master problem with cuts: GAMS does not permit conditional equations
- Replies: 5
- Views: 3668
Re: HELP! Augmenting master problem with cuts: GAMS does not permit conditional equations
I can't understand. As you say, the 3rd iteration constraint "2.5 <= x <= 8" will be added iff z result in the 2nd iteration is <= 1, but z reaches its optimum 2 in 2nd iteration. So the constraint will not be triggered. You can observe the Equation list in .lst file to check the constrai...
- 5 years ago
- Forum: Modeling
- Topic: HELP! Augmenting master problem with cuts: GAMS does not permit conditional equations
- Replies: 5
- Views: 3668
Re: HELP! Augmenting master problem with cuts: GAMS does not permit conditional equations
I can't understand. As you say, the 3rd iteration constraint "2.5 <= x <= 8" will be added iff z result in the 2nd iteration is <= 1, but z reaches its optimum 2 in 2nd iteration. So the constraint will not be triggered. You can observe the Equation list in .lst file to check the constrain...
- 5 years ago
- Forum: Modeling
- Topic: HELP! Augmenting master problem with cuts: GAMS does not permit conditional equations
- Replies: 5
- Views: 3668
Re: Augmenting master problem with cuts: GAMS does not permit conditional equations
Hi Anby, First of all, your model is apparently infeasible because you have w <= 22 and w >= 26, which is contradictory. Then the way you add your constraint is weird. But it is still doable in GAMS. I have written the code for you, which shows integer infeasible. Positive Variable x; Integer Variab...
- 5 years ago
- Forum: Syntax
- Topic: How to keep it compact
- Replies: 1
- Views: 2479
Re: How to keep it compact
Hi, If you only need to reduce the times you write the term "Parameter", it is very easy: Parameter AH Maximum absolute humidity in hood in g water.(kg dry air)-1 l(c) latent heat for the steam condensation at pr(c) in kJ.kg-1; l(c)= 1.6807*pr(c)*pr(c)-40.975*pr(c)+2270.9 ; AH = 4.8101*exp...
- 5 years ago
- Forum: Modeling
- Topic: Altering the standard transportation problem
- Replies: 3
- Views: 3163
Re: Altering the standard transportation problem
Suggest you to post your code which others can run, either using BBcode or attachment Then we are more convenient and comprehensive to help you!
Best,
Gabriel
Best,
Gabriel
- 5 years ago
- Forum: Syntax
- Topic: binary variable fixed value for 1 place - solution searched
- Replies: 1
- Views: 1953
Re: binary variable fixed value for 1 place - solution searched
solution is simple
Suggest you to search relevant documentation first when encountering problem
Cheers.
Gabriel
Code: Select all
ow.fx('w1') = 1;
Cheers.
Gabriel
- 5 years ago
- Forum: Modeling
- Topic: how to use a loop statement into dynamic recursive model?
- Replies: 2
- Views: 3000
Re: how to use a loop statement into dynamic recursive model?
Hi Rodrigue, To store/use values in each loop, I recommend two alternatives. 1. Define a global parameter to store the value and update it in each iteration. An illustrative example is shown below. Set k /1*100/; Parameter store(n); store(n) = *something initial*; loop(k, param(n) = store(n); * para...
- 5 years ago
- Forum: Modeling
- Topic: To binary or not to binary...
- Replies: 4
- Views: 3885
Re: To binary or not to binary...
More precisely, if your variable can ONLY take integer values from 50 to 150, as you stated in the post, then define the variable used by Manassaldi as integer variable like the following. Integer Variable T; T.lo=50; T.up=150; For more definition reference, you can visit the documentation site. htt...
- 5 years ago
- Forum: Syntax
- Topic: Product between matrices and vector
- Replies: 2
- Views: 3457
Re: Product between matrices and vector
Hi, Try to use loops. I wrote a simple code for you. set col /1*4/ set row /1*5/ Table matrix(row, col) 1 2 3 4 1 2 3 4 5 2 4 6 2 1 3 9 7 1 0 4 6 7 1 8 5 7 2 3 1 ; Parameter vector(col)/ 1 1 2 1 3 0 4 0 /; Parameter result(row); loop(row, result(row) = sum(col, matrix(row, col) * vector(col)); ); di...