Optimization Toolbox - Choosing a Solver

조회 수: 1 (최근 30일)
Norbert
Norbert 2012년 5월 23일
I have a problem finding the correct solver for my optimization problem.
I have a vector called dayload, with dimension 1440x1, representing the electrical load profile of a household of one day (24h*60min/h=1440min). I also have a price profile for that day called price with dimension 1440x1. Furthermore there is a profile for a specific device with dimensions 120x1 (device is on 120min) and a startindex of 850 (refering to dayload). Now I want to shift device from the startindex 850 within the following bounds:
-200 <= shift <= 200 (which means the device can be shifted 200min backwards or forwards at most)
The new dayload including the shifted device would now be:
dayload_new = dayload; dayload_new(startindex+shift:startindex+shift+length(device)) = dayload_new(startindex+shift:startindex+shift+length(device))+device;
So I want to optimize shift, so that the costs are a minimum: costs = price.*(dayload_new) (costs represents a 1440x1 vector. Therefore I guess I'll have to sum up all the elements of costs and minimize sum(costs) to achieve minimizing the costs-function)
Thanks in advance!

답변 (1개)

Seth DeLand
Seth DeLand 2012년 5월 23일
Hi Norbert, Since your decision variable shift will need to be an integer (it's being used as an index), you would need to use a solver that can constrain variables to be integers. GA from the Global Optimization Toolbox is the only solver with built-in support for constraining variables to be integers.
Since the calculation of "costs" should be pretty quick, I would recommend just looping through all possible values of shift -200:200, and see which one gave the lowest cost.
  댓글 수: 1
Norbert
Norbert 2012년 5월 23일
What about bintprog? Or using other solver like fmincon with using the fix function on the shift-variable, which gives me integer values.
fix(shift)
By saying looping through all possibilities, do you mean I should try to find lowest costs by building my own function instead of using one of the optimization solvers?

댓글을 달려면 로그인하십시오.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by