how to solve this linear program with objective function variable in time

hi everybody I'm an italian student and I have a question about this problem. I have this objective function: min ∑t pv (x1 + x2) - ∑t ps (x3+x4) where t is a discrete variable from 0 to 24 with 1hour step; x are my variables and pv & ps are 2 parameters changing during 24 hours (I have 24 value for each one)
my constraints are formulated in this way: x1 + x5 <= cp;
x6 + x7 + x2 = dm ;
and others 3 similar. cp and dm are also variable in 24 hours. totally I have 8 variables. Furthermore 1 of this 8 variables is continue during 24 hourse instead other 7 are discrete. for this continue variable I have the law:
x8(t) - x8 (t-1) = 0.85 (x5 + x1) - 1/0.85 (x7+x4).
My answer is...how I can solve this problem?? I want optimal value of my 8 variables in each hour..so I need a result matrix [24*8] . Do I have to use simulink? help me!! thank you and I'm sorry for my non-perfect english! bye

Risposte (2)

I believe you can formulate this problem without time, but with more variables, something along the following lines:
z(1) = x1(1); % x1 at time 1
z(2) = x2(1); % x2 at time 1
...
z(8) = x8(1);
z(9) = x1(2); % x1 at time 2
z(10) = x2(2);
...
z(8*24) = x8(24);
Now you have all your variables defined in terms of one long vector z. Express your constraints in terms of the vector z and you are done.
For a similar but smaller example, see the documentation.
Alan Weiss
MATLAB mathematical toolbox documentation
Matt J
Matt J il 30 Mag 2013
Modificato: Matt J il 30 Mag 2013
You can use LINPROG to solve for x1...x7 if you have the optimization toolbox. When you do so, you would ignore x(8) and the equation
x8(t) - x8 (t-1) = 0.85 (x5 + x1) - 1/0.85 (x7+x4).
The right hand side of the above will become known, once you've solved the other variables and constraints using LINPROG. The equation for x(8) then reduces to a first order difference equation, which you can solve with appropriate initial conditions.

Categorie

Richiesto:

mat
il 30 Mag 2013

Community Treasure Hunt

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

Start Hunting!

Translated by