| |
| |
| |
|
|
| function _add_profiled_unit!( |
| model::JuMP.Model, |
| pu::ProfiledUnit, |
| sc::UnitCommitmentScenario, |
| )::Nothing |
| punits = _init(model, :prod_profiled) |
| net_injection = _init(model, :expr_net_injection) |
| for t in 1:model[:instance].time |
| |
| punits[sc.name, pu.name, t] = @variable( |
| model, |
| lower_bound = pu.min_power[t], |
| upper_bound = pu.max_power[t], |
| base_name = "prod_profiled_$(sc.name)_$(pu.name)_$(t)", |
| ) |
|
|
| |
| add_to_expression!( |
| model[:obj], |
| punits[sc.name, pu.name, t], |
| pu.cost[t] * sc.probability, |
| ) |
|
|
| |
| add_to_expression!( |
| net_injection[sc.name, pu.bus.name, t], |
| punits[sc.name, pu.name, t], |
| 1.0, |
| ) |
| end |
| return |
| end |
|
|