Optimization Toolbox - Choosing a Solver
Mostrar comentarios más antiguos
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!
Respuestas (1)
Seth DeLand
el 23 de Mayo de 2012
1 voto
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 comentario
Norbert
el 23 de Mayo de 2012
Categorías
Más información sobre Get Started with Optimization Toolbox en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!