solve multi-stage optimization problem

15 ビュー (過去 30 日間)
Duda R.
Duda R. 2019 年 7 月 2 日
I have data with hourly prices for a year, following geometric Brownian motion and yearly interest rate x.Pumped storage with capacity y MW, maximal capacity to inject or withdraw of z MWh and efficiency w. I need to maximize the profits of possessing the pumped storage by energy trading in time horizon of 24hours.
I use Yalmip, and get always 0 as obj. Can someone help?
% Time horizon
T = 24;
% Energy prices
pf = S(1,2:25)';
% Optimization
% Decision variables
x = sdpvar(T,2); % [charging,discharging]
s = sdpvar(T+1,1);
% Objective function and constraints
obj = pf'*(x*[-1; eff]);
con = [s(1)==0, s(T+1)==0, (0<=s),(s<=cap),...
s(2:T+1)==s(1:T)+x*[eff; - 1], ...
0<=x(:,2)<=s(1:T), 0<=x(:,2)<=maxcap, 0<=eff*x(:,1)<=maxcap];
% Optimization
options = sdpsettings('solver','linprog','verbose',0);
optimize(con,-obj,options);

回答 (0 件)

カテゴリ

Help Center および File ExchangeOptimization Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by