Skip to content

Commit

Permalink
fix for compressor power expression output
Browse files Browse the repository at this point in the history
This value need not be printed in the solution. The value of a duplicate variable equated to this expression is already being printed as "power_var"
  • Loading branch information
hskkanth committed Oct 7, 2024
1 parent fabf9c0 commit 4259e62
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/core/transient_expression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function expression_non_slack_affine_derivative(
end

"compression power"
function expression_compressor_power(gm::AbstractGasModel, nw::Int; report::Bool = true)
function expression_compressor_power(gm::AbstractGasModel, nw::Int; report::Bool = false)
comp_power = var(gm, nw)[:compressor_power_expr] = Dict{Int,Any}()
for (i, compressor) in ref(gm, nw, :compressor)
alpha = var(gm, nw, :compressor_ratio, i)
Expand All @@ -162,12 +162,4 @@ function expression_compressor_power(gm::AbstractGasModel, nw::Int; report::Bool
var(gm, nw, :compressor_power_expr)[i] = JuMP.@expression(gm.model, W * abs(f) * (alpha^m - 1.0))
end

report && sol_component_value(
gm,
nw,
:compressor,
:power_expr,
ids(gm, nw, :compressor),
comp_power,
)
end

0 comments on commit 4259e62

Please sign in to comment.