limits of Optimization variable can be another variable in problem based optimization?
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jayachandra Malavatu
am 9 Aug. 2022
Kommentiert: Matt J
am 9 Aug. 2022
I have optimization variable named PbattV1 in problem based optimization
Pmax1=10;
PbattV1 = optimvar('PbattV1',N,'LowerBound',0,'UpperBound',Pmax1);
As per optimvar help, Pmax1 (UpperBound) should be scalar. Now i want to change Pmax1= 10*a
where 'a' is another variable 0<a<1, is it possible to do it in problem based optimization and define 'a ' is a nother optimal variable ?
1 Kommentar
Matt J
am 9 Aug. 2022
As per optimvar help, Pmax1 (UpperBound) should be scalar
No, it doesn't have to be a scalar. It must be a constant, however.
Akzeptierte Antwort
Matt J
am 9 Aug. 2022
Bearbeitet: Matt J
am 9 Aug. 2022
No, you must use a linear inequality constraint:
PbattV1 = optimvar('PbattV1',N,'LowerBound',0);
prob.Constraints.conName=(PbattV1<=10*a);
2 Kommentare
Matt J
am 9 Aug. 2022
You're welcome, but please Accept-click the answer to indicate that it resolved your question.
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!