From f5a92358d75f299193c6bd699c0327fb8a61227f Mon Sep 17 00:00:00 2001 From: "Alinson S. Xavier" Date: Wed, 8 Mar 2023 09:44:08 -0600 Subject: [PATCH] Formulation: If plant is closed, storage cannot be used --- src/model/build.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/model/build.jl b/src/model/build.jl index c6699c2..0f7ada4 100644 --- a/src/model/build.jl +++ b/src/model/build.jl @@ -237,6 +237,12 @@ function create_process_node_constraints!(model::JuMP.Model) model[:capacity][n, t] <= n.location.sizes[2].capacity * model[:is_open][n, t] ) + # If plant is closed, storage cannot be used + @constraint( + model, + model[:store][n, t] <= n.location.storage_limit * model[:is_open][n, t] + ) + # If plant is open, capacity is greater than base @constraint( model,