필터 지우기
필터 지우기

Optimize/maximize for multiple functions that depend on eachother in time.

조회 수: 1 (최근 30일)
Maurice Hendriks
Maurice Hendriks 2017년 8월 6일
답변: Chris Perkins 2017년 8월 8일
I'm calculating the profit that can be made when connecting a battery to the electricity grid; Charging when electricity is cheap and discharging when it's expensive. I have a function [Level, Profit] = fun(Power,Level0,Eur) that calculates the level of charging of a battery and the profit/loss during discharging/charging for the price 'Eur' of electricity for that hour. I want to calculate the optimal power input/output per hour to maximize the profit for a period of N hours. The array Eur is set and Level0 depends on Level of the previous hour something like:
for i=Nhours
[Level(i); Profit(i)]=fun(power(i),Level(i-1),Eur(i))
end
total_profit=Sum(Profit)
I want to get the array for Power that maximizes total_profit. How can I find the array Power that maximizes total_profit?
Thanks!

답변 (1개)

Chris Perkins
Chris Perkins 2017년 8월 8일
Hi Maurice,
If you have the Optimization Toolbox, you can use any of the functions described in the following link, depending on which fit your custom function best:
If you do not have the Optimization Toolbox, some optimization functions are included with just MATLAB, and they are described in the following link:

카테고리

Help CenterFile Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by