Originally posted by: phanThom
Hello again!
I still have a doubt about my optimization model which I still couldn't resolve entirely:
I want to make sure that the integer decision variable SBEBezug[r][s][b][e] (representing the amount of energy that is bought by a company site s in period r from energy provider b and especially from one of his offered energy types e) does not get bigger than necessary. The energy demand for a site in period r is calculated in the float decision expression EnDemGesamtRS[r][s] since it includes various integer decision variables and partly non-integer parameters. That's why I want to make sure that the sum over b and e SBEBezug[r][s][b][e] is just the next bigger integer value to EnDemGesamtRS[r][s]. I tried to realize that with the following constraint but an extraction error is thrown.
forall(r in Periode)
forall(s in Standort)
nbStrombezug: sum(b in Versorger)(sum(e in Energie)SBEBezug[r][s][b][e]) >= (EnDemGesamtRS[r][s]);
First I tried it just with >= and without the ceil operator because I was hoping that the energy price and the energy emissions would avoid a bigger purchase than necessary but it resulted that the purchase was equal to the maximal capacity of one of the energy providers. The only restriction using the energy provider's capacity is:
forall(r in Periode)
forall(b in Versorger)
forall(e in Energie)
nbVersorgerkapazitaet: BKap[b][e] >= sum(s in Standort)SBEBezug[r][s][b][e];
Is the energy demand expression just too big or did I make some kind of mistake programming? When I use an invented energy demand matrix it seems to work but that can't be the final solution (at least I hope so).
Is there another way to respect my explained constraint? I attach the files. The problematic constraint can be found in the lines 1744 to 1746 of the ceil-problem.mod file.
Best regards
PS: I'm using version 12.5 and I'm afraid that it will not be possible for me to get an update to version 12.6.
#DecisionOptimization#OPLusingCPLEXOptimizer