Search found 108 matches

by cladelpino
5 years ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 28
Views: 21353

Re: Objective with if-condition

It seems that the example from post #2 misses to properly link variables SurplusPower and isPositive. The example doesn't work if the objective is minimized instead of maximized. Yes, my bad, sorry :oops: . This last formulation that Fred presents is much better. Peter: I do not understand this as ...
by cladelpino
5 years ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 28
Views: 21353

Re: Objective with if-condition

( Disclaimer : Fred suggestion comes into the domain of what I meant with (BigM is) a general approach that can be improved depending on the objective function . I'm so used to not being able to make assumptions about the objective function that I remember bigMs better than I can remember the simple...
by cladelpino
5 years ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 28
Views: 21353

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 years ago
Forum: Syntax
Topic: Is it possible to use sets and variables this way ?
Replies: 2
Views: 2589

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 years ago
Forum: Solvers
Topic: BARON may not give global optimum although the model status is "1 Optimal"
Replies: 1
Views: 3171

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 years ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 28
Views: 21353

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 su...
by cladelpino
5 years ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 28
Views: 21353

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...
by cladelpino
5 years ago
Forum: Solvers
Topic: MIP Start with CPLEX from a file
Replies: 26
Views: 25960

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
5 years ago
Forum: Modeling
Topic: How do I create a function in GAMS?
Replies: 1
Views: 2068

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 relaxati...
by cladelpino
5 years ago
Forum: Solvers
Topic: MIP Start with CPLEX from a file
Replies: 26
Views: 25960

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