## Search found 57 matches

1 year ago
Forum: Syntax
Topic: Continued Equality for Condition
Replies: 3
Views: 1278

### Re: Continued Equality for Condition

Thanks for your kind reply! That should be the best solution!

Gabriel
1 year ago
Forum: Modeling
Topic: MIQP Problem Formulated as MIQCP?
Replies: 5
Views: 1612

### MIQP Problem Formulated as MIQCP?

Hi all, I got one issue reporting "System Failure". My opt. problem has a mixed-integer quadratic objective function with linear constraints, and I defined it as an MIQCP problem. the report summary is as follows. S O L V E S U M M A R Y MODEL dualspregu OBJECTIVE subdualregu TYPE MIQCP DIRECTION MI...
1 year ago
Forum: Syntax
Topic: Continued Equality for Condition
Replies: 3
Views: 1278

### Re: Continued Equality for Condition

Sorry but I found the solution myself :D And I apologize for the error in the post that I use 'n' twice for index. I share my solution with you. loop(i, ... loop(n, s(n) = a('1') - a(n); ); if(sum(n, s(n)) = 0, k = 1; ); break\$(k = 1); continue; ); If you have better idea please share with me too! T...
1 year ago
Forum: Syntax
Topic: Continued Equality for Condition
Replies: 3
Views: 1278

### Continued Equality for Condition

Hi all, Long time no see! I have one question about the implementation of continued equality for a break condition of my algorithm. I want to achieve the following pseudocode: If: a(1) = a(2) = a(3) = ... = a(n), then Break; else: Continue; In a GAMS code manner: loop(n, ... break\$(a(1)=a(2) and a(1...
1 year ago
Forum: Modeling
Topic: fixing binary variable
Replies: 1
Views: 512

### Re: fixing binary variable

The former one is simple and efficient. I never use the latter method to do this so I do not know which one performs better w.r.t. running time. But the former one is simply good and easy to implement. Execution time of the solver might not be influenced with how you define the variable. But the lat...
1 year ago
Forum: Modeling
Topic: Generate Equation and Column Listing without solving
Replies: 3
Views: 632

### 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...
1 year ago
Forum: Modeling
Topic: HELP! Augmenting master problem with cuts: GAMS does not permit conditional equations
Replies: 5
Views: 714

### 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 constraints appear...
1 year ago
Forum: Modeling
Topic: HELP! Augmenting master problem with cuts: GAMS does not permit conditional equations
Replies: 5
Views: 714

### 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 constraints appeare...
1 year ago
Forum: Modeling
Topic: HELP! Augmenting master problem with cuts: GAMS does not permit conditional equations
Replies: 5
Views: 714

### 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...
1 year ago
Forum: Syntax
Topic: How to keep it compact
Replies: 1
Views: 508

### 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(0.0577*dp...