Search found 96 matches

by cladelpino
1 day ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 6
Views: 86

Re: Objective with if-condition

But I do not understand why isPositive = 1 when surplusPower > 0. Let's say surplusPower(t) = -10 and isPositive(t) = 1: bm1a(t): positiveSurplusPower(t) =l= -10 bm1b(t): positiveSurplusPower(t) =g= -10 --> positiveSurplusPower(t) = -10 bm2a(t): positiveSurplusPower(t) =l= bigM bm2b(t): positiveSur...
by cladelpino
5 days ago
Forum: Syntax
Topic: Is it possible to use sets and variables this way ?
Replies: 2
Views: 53

Re: Is it possible to use sets and variables this way ?

hmm. I didn't really understand how the requirement arose, but,just in case:

you are aware of this notation, right ?

Code: Select all

set setForT /1*10/;
variable T(setForT); 
by cladelpino
5 days ago
Forum: Solvers
Topic: BARON may not give global optimum although the model status is "1 Optimal"
Replies: 1
Views: 22

Re: BARON may not give global optimum although the model status is "1 Optimal"

I would say that numerical error is a likely cause, given that:

( 85461884.9974 - 85461884.5701 ) / (85461884.9974 ) ~= 1 E-9 .

The solver tolerances may very well be higher than this value.
by cladelpino
5 days ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 6
Views: 86

Re: Objective with if-condition

They are, as you call them, "decision variables". Check out my ready to run example in the prior post, I've never set their values. In that example, by using constraints bm1a,bm1b,bm2a,bm2b you can see that the feasible region of the problem is limited to having isPositive = 1 only when surplusPower...
by cladelpino
1 week ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 6
Views: 86

Re: Objective with if-condition

This is a branch of optimization called "disjunctive programming". Much can be said about it, but one of the easiest way to implement this for your case is to use an auxiliary binary variable in what is called a "big-M" approach. I've put together a small example for you, in this case a general appr...
by cladelpino
1 week ago
Forum: Solvers
Topic: MIP Start with CPLEX from a file
Replies: 13
Views: 170

Re: MIP Start with CPLEX from a file

Hmm, we are now in the realm of official help, your question is valid. My guess is that this option was fully implemented in the newer GAMS versions. I will expect an answer with you :)
by cladelpino
1 week ago
Forum: Modeling
Topic: How do I create a function in GAMS?
Replies: 1
Views: 47

Re: How do I create a function in GAMS?

Yes, this is usual practice. If it is "advisable" or not really cannot be answered in general, AFAIK. Some solvers (ie CONOPT in NLP) favor "sparseness" in models and would recommend this approach. In the context of MILP, different formulations could lead to different LP relaxations and therefore th...
by cladelpino
1 week ago
Forum: Solvers
Topic: MIP Start with CPLEX from a file
Replies: 13
Views: 170

Re: MIP Start with CPLEX from a file

Do I have to specifiy every value for each variable (even if it is not a decision variable) to make a solution complete? This may be the problem. From https://www.gams.com/latest/docs/S_CPLEX.html#CPLEXmipstart , mipstart=1 is set to be "auto" level, for which I cannot find a reference in the CPLEX...
by cladelpino
1 week ago
Forum: Solvers
Topic: MIP Start with CPLEX from a file
Replies: 13
Views: 170

Re: MIP Start with CPLEX from a file

This is the kind of approach that I am thinking of when I say that to prove if a solution is feasible or not is "easy". It is as hard as writing the fixing of the variables for each variable block you have (and you don't seem to have many blocks, rather many elements within a block) set manyVariable...
by cladelpino
1 week ago
Forum: Modeling
Topic: Why does GAMS return "infeasible" solution when I add lower bound?
Replies: 1
Views: 37

Re: Why does GAMS return "infeasible" solution when I add lower bound?

In the NLP context, the "path" that the solver follows is non-trivial and faced with many challenges. All that you are observing is "normal" behaviour for this type of problems. For the specific case of division, your approach: I managed to multiply through by x and get rid of the division, but is t...