How to write equality constraints for receivers that hourly consume a certain amount of energy
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Simona
el 12 de Ag. de 2015
Comentada: Simona
el 13 de Ag. de 2015
1. How to write equality constraints for receivers that hourly consume a certain amount of energy (let's say 0.9 kWh) once a day? Its hourly consumption can be 0 or 0.9. Its total daily consumption = 0.9. I set lb = 0 and up = 0.9. During the optimization process, this consumption is flexible, the receiver can be scheduled to consume at 11 or 12 o'clock for instance.
2. How to write equality constraints for receivers that can't be interrupted and consume at two consecutive hours certain amount of energy (let's say 2 and 0.7 kWh) once a day? Its total daily consumption = 2.7. I set lb = 0 and ub = 2. This receiver can also consume at any time intervals, the only restrictions are: it should consume at two consecutive time intervals and first 2 kWh and then 0.7 kWh.
2 comentarios
Brendan Hamm
el 12 de Ag. de 2015
What does the vector of design variables look like? Is it hourly consumption rates for the entire day? What is the length of the variable (24-by-1)?
Respuesta aceptada
Brendan Hamm
el 12 de Ag. de 2015
You should be representing the design variables as a column vector, I will call it x. With that in mind we want the constraint:
Aeq*x = beq;
If we wish to write the sum of values in x is equal to 5, then we should have:
Aeq = ones(1,24);
beq = 5;
Now simply pass these into the appropriate solver.
For part 2 you will likely need to use some form of global optimization for this, unless your objective in linear as is expected by intlinprog.
7 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Linear Programming and Mixed-Integer Linear Programming en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!