## Search found 66 matches

1 year ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 28
Views: 3913

### Re: Objective with if-condition

Thanks cladelpino for your answer, you wrote This is a very common misconception. The sooner you forget about it, the better your path in optimization will be. There is no difference between one type of equality constraint or the other, neither is the problem solved sequentially. The best model to r...
1 year ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 28
Views: 3913

### Re: Objective with if-condition

@cladelpino Thanks cladelpino for your answer and help, On equation levels: Picture your equation in a way where every variable is on the left hand side of the operator (=g=,=l=, or =e=) , and on the right hand side you have (if there is any) the "constant" (determined only by parameters and constan...
1 year ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 28
Views: 3913

### Re: Objective with if-condition

Thanks Fred for your answer, I inserted the two equations. Now a reasonable solution is found But only for one household. If I increase the number of households I always get the error message: "Row 'eq_electricalPowerTotal(144)' infeasible, all entries at implied bounds" The problematic equation loo...
1 year ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 28
Views: 3913

### Re: Objective with if-condition

Thanks cladelpino for your answer, the values for isPositive are 0 for every timeslot in the results. There is one further aspect that I generally don't understand: What is the difference (in the result file) between the values of a variable and a corresponding equation that defines this variable? L...
1 year ago
Forum: Solvers
Replies: 26
Views: 5969

no, I do not think that multiple solutions would change the performance significantly. I justed wanted to know if that is possible or not. Anyways, thanks for your help
1 year ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 28
Views: 3913

### Re: Objective with if-condition

Thanks Fred and cladelpino for your answers, first I want to try it with the bigM approach suggested by cladelpino (afterwards I will also try the other approach). So I inserted the following code: ... eq_bm1a(t).. positiveSurplusPower(t) =l= surplusPower(t) + bigM * (1-isPositive(t)) ; eq_bm1b(t).....
1 year ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 28
Views: 3913

### Re: Objective with if-condition

Thanks a lot cladelpino for your answer and your help, unfortunately I do not understand everything: 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 > 0. I see that if isPositive=...
1 year ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 28
Views: 3913

### Re: Objective with if-condition

Thanks cladelpino for suggesting this interesting approach, I have a question regarding it: I do not really understand how the values for the variable isPositive(t) are determined? I understand the purpose of this binary variable but do I have to specify the values before the optimization (this woul...
1 year ago
Forum: Solvers
Replies: 26
Views: 5969

Thanks Fred for your help, especially regarding how to test if a solution if feasible.

Now - even with the old GAMS version - I can start the problem with a feasible solution.

Is it also possible to start the model with several feasible solutions?
1 year ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 28
Views: 3913

### Objective with if-condition

Hi all, I have a problem regarding modelling an objective function which should only count if it is positive. I am using a MIP model with binary variables. So I have the following equation (not in GAMS yet): surplusPower(t) =PVgeneration(t) - electricalPowerTotal(t); if (surplusPower(t) < 0) { surpl...