From 9f09e71bfbb7364480f3bec522cd7b52636584da Mon Sep 17 00:00:00 2001 From: Aleksandr Kazachkov Date: Fri, 23 Jul 2021 19:31:42 -0400 Subject: [PATCH] Fix non-bool use of _is_initially_on --- src/model/formulations/Gar1962/status.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model/formulations/Gar1962/status.jl b/src/model/formulations/Gar1962/status.jl index 9e7f61a..ae34b02 100644 --- a/src/model/formulations/Gar1962/status.jl +++ b/src/model/formulations/Gar1962/status.jl @@ -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