Finding the Maximum of an Optimization Data Type

조회 수: 3 (최근 30일)
Micah Mungal
Micah Mungal 2020년 4월 21일
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개)

카테고리

Help CenterFile Exchange에서 Nonlinear Optimization에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by