Search found 39 matches

by PeterBe
2 days ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 3
Views: 63

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...
by PeterBe
2 days ago
Forum: Solvers
Topic: MIP Start with CPLEX from a file
Replies: 12
Views: 143

Re: MIP Start with CPLEX from a file

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?
by PeterBe
4 days ago
Forum: Syntax
Topic: Objective with if-condition
Replies: 3
Views: 63

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...
by PeterBe
4 days ago
Forum: Solvers
Topic: MIP Start with CPLEX from a file
Replies: 12
Views: 143

Re: MIP Start with CPLEX from a file

Thanky for your answer, I tried different values (1,2,3,4,5) for mipstart in the option file cplex.opt but all (execpt mipstart=1) yield the following errors Reading parameter(s) from "C:\Users\wi9632\bwSyncAndShare\Graduiertenkolleg\Code\GAMS\Residential Area\cplex.opt" >> mipstart=5 *** Value Erro...
by PeterBe
5 days ago
Forum: Solvers
Topic: MIP Start with CPLEX from a file
Replies: 12
Views: 143

Re: MIP Start with CPLEX from a file

Thanks for your answer cladelpino, On the other hand, it is "easy" to see if a given solution is infeasible. Why don't you figure that out so that you're sure ? Basically it is not that easy to test if a solution is feasible because I have around 10000 binary decision variables and about 10000 condi...
by PeterBe
6 days ago
Forum: Solvers
Topic: MIP Start with CPLEX from a file
Replies: 12
Views: 143

Re: MIP Start with CPLEX from a file

Thanks for your answer "cladelpino ", I tried it and in the log there is the following information: Reading parameter(s) from "C:\Users\wi9632\GAMS\cplex.opt" >> mipstart=1 ... Reading data... Starting Cplex... Space for names approximately 2.77 Mb Use option 'names no' to turn use of names off Proc...
by PeterBe
1 week ago
Forum: Solvers
Topic: MIP Start with CPLEX from a file
Replies: 12
Views: 143

Re: MIP Start with CLEP from a file

Thanks for the link. I know how parameters are exchanged between Excel and GAMS. For example if I want to load a price from a gdx file I have to write the following code: price(t) price $LOAD price" But now I do not want to load parameters, I want to transfer feasible solutions to the solver (CPLEX)...
by PeterBe
1 week ago
Forum: Solvers
Topic: MIP Start with CPLEX from a file
Replies: 12
Views: 143

MIP Start with CPLEX from a file

Hi guys, I want to use a starting solution for CPLEX. In the CPLEX manual of the GAMS webpage the following is written: "A MIP start will only be used by GAMS/CPLEX if the MipStart parameter is set to 1. The starting values must be set via the .L variable attribute in the GAMS model before the solve...
by PeterBe
2 months ago
Forum: Modeling
Topic: Ensuring realations between decision variables
Replies: 6
Views: 818

Re: Ensuring realations between decision variables

Thanks Manassaldi for your answer, it seems to work, except for the very first two time slots. There the heating in stopped after 2 timeslots (which is not nice but not a big problem)
by PeterBe
2 months ago
Forum: Modeling
Topic: Ensuring realations between decision variables
Replies: 6
Views: 818

Re: Ensuring realations between decision variables

Hi guys, quite a long time ago I posted the question that you can see in the first post: I have a binary variable x(t) for every minute of a day (1440). This binary variable indicates if a heating device is on or off. Now I want to ensure that the device does not switch from on to off quite frequent...