Finding the Maximum of an Optimization Data Type

21 vues (au cours des 30 derniers jours)
Micah Mungal
Micah Mungal le 21 Avr 2020
I am looking at the Unit Commitment problem (determining which and when Generating Units should be commmitted for lowest cost of operation). Now I have three optimization variables:
%Amount of power generated in an hour by a plant
power = optimvar('power',nHours,plant,'LowerBound',0,'UpperBound',maxGenConst);
%Indicator if plant is operating during an hour
isOn = optimvar('isOn',nHours,actual_plant,'Type','integer','LowerBound',0,'UpperBound',1);
%Indicator if plant is starting up during an hour
startup = optimvar('startup',nHours,actual_plant,'Type','integer','LowerBound',0,'UpperBound',1);
And there is a specific constraint I would like to include. Initially this was the constraint:
powerprob.Constraints.spinningReserve = sum((maxPowConst.*isOn),2) >= Load + SR;
Where Load and SR (spinning reserve) were constant values. I have successfully run the simulation with this constraint. However, now I am trying to replace SR with the capacity of the largest unit committed at that point in time. This is what I have tried:
powerprob.Constraints.spinningReserve = sum((maxPowConst.*isOn),2) >= Load + max((maxPowConst.*isOn),2);
However, I get an error using max because the argument for the max function is an optimization data type. I'm looking for some function or some alternative for incorporating this constraint.

Réponses (0)

Catégories

En savoir plus sur Nonlinear Optimization dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by