solve multi-stage optimization problem
16 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Optimization Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!