Optimization Toolbox - Choosing a Solver

2 Ansichten (letzte 30 Tage)
Norbert
Norbert am 23 Mai 2012
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!

Antworten (1)

Seth DeLand
Seth DeLand am 23 Mai 2012
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 Kommentar
Norbert
Norbert am 23 Mai 2012
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?

Melden Sie sich an, um zu kommentieren.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by