Finding the Maximum of an Optimization Data Type
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Nonlinear Optimization en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!