|
|
|
@ -75,7 +75,7 @@ function _add_status_vars!(
|
|
|
|
|
fix(switch_on[g.name, t], (t == 1 ? 1.0 - _is_initially_on(g) : 0.0); force = true)
|
|
|
|
|
fix(switch_off[g.name, t], 0.0; force = true)
|
|
|
|
|
elseif t == 1
|
|
|
|
|
if _is_initially_on(g)
|
|
|
|
|
if is_initially_on
|
|
|
|
|
# Generator was on (for g.initial_status time periods),
|
|
|
|
|
# so cannot be more switched on until the period after the first time it can be turned off
|
|
|
|
|
fix(switch_on[g.name, 1], 0.0; force = true)
|
|
|
|
@ -92,7 +92,7 @@ function _add_status_vars!(
|
|
|
|
|
switch_on[g.name, t] = (t == 1 ? 1.0 - _is_initially_on(g) : 0.0)
|
|
|
|
|
switch_off[g.name, t] = 0.0
|
|
|
|
|
elseif t == 1
|
|
|
|
|
if _is_initially_on(g)
|
|
|
|
|
if is_initially_on
|
|
|
|
|
switch_on[g.name, t] = 0.0
|
|
|
|
|
else
|
|
|
|
|
switch_off[g.name, t] = 0.0
|
|
|
|
|