Search found 72 matches

by GabrielYin
5 years ago
Forum: Syntax
Topic: Different CPLEX threads influences final results?
Replies: 4
Views: 4989

Re: Different CPLEX threads influences final results?

Sorry, for threads = 4 case, the elapsed time is 5min38sec.

Gabriel
by GabrielYin
5 years ago
Forum: Syntax
Topic: Different CPLEX threads influences final results?
Replies: 4
Views: 4989

Different CPLEX threads influences final results?

Hi all, I have tried to set different threads for CPLEX solver to facilitate my computation, but weirdly, different threads gave different final results. Based on my knowledge, setting threads will only influence the speed because it is for parallel computing, but will not have any impact on the exe...
by GabrielYin
5 years ago
Forum: Tools
Topic: How to fancily label and observe .lst file
Replies: 1
Views: 4014

How to fancily label and observe .lst file

Hi all, I am using a linux-version GAMS in a linux system. It does give me a .lst file after compilation, but it cannot be viewed as in GAMS IDE, like shown in the following. .lst file in a GAMS IDE is with very fancy labels and can be easily viewed. https://image.ibb.co/b9damp/lst.jpg I have tried ...
by GabrielYin
5 years ago
Forum: Modeling
Topic: MIQP Problem Formulated as MIQCP?
Replies: 5
Views: 5694

Re: MIQP Problem Formulated as MIQCP?

Gabriel, From the log output you sent I would conclude that the GAMS/CPLEX link has found a general non-linear constraint in your problem. Simply put, it does not think it is a QCP. The specific output I refer to is: General nonlinearity detected in row subobjregu -Steve Thank you! However, the row...
by GabrielYin
5 years ago
Forum: Modeling
Topic: MIQP Problem Formulated as MIQCP?
Replies: 5
Views: 5694

Re: MIQP Problem Formulated as MIQCP?

Hi, Perhaps you have use x**2 to represent your quadratic part. **2 is the real power (https://www.gams.com/latest/docs/UG_Parameters.html#INDEX_power_2d__21_function) and can't be used in QCP models. So better use power(x,2) or even simpler sqr(x) . -Michael Thank you! Actually I was using abs() w...
by GabrielYin
5 years ago
Forum: Syntax
Topic: Continued Equality for Condition
Replies: 3
Views: 4600

Re: Continued Equality for Condition

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

Gabriel
by GabrielYin
5 years ago
Forum: Modeling
Topic: MIQP Problem Formulated as MIQCP?
Replies: 5
Views: 5694

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 DI...
by GabrielYin
5 years ago
Forum: Syntax
Topic: Continued Equality for Condition
Replies: 3
Views: 4600

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...
by GabrielYin
5 years ago
Forum: Syntax
Topic: Continued Equality for Condition
Replies: 3
Views: 4600

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...
by GabrielYin
5 years ago
Forum: Modeling
Topic: fixing binary variable
Replies: 1
Views: 2114

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...