Skip to content

Commit

Permalink
formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-lara committed Nov 29, 2024
1 parent 04b7d07 commit bf76d05
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/core/optimization_container.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,13 @@ function add_expression_container!(
meta = IS.Optimization.CONTAINER_KEY_EMPTY_META,
) where {T <: ExpressionType, U <: Union{PSY.Component, PSY.System}}
expr_key = ExpressionKey(T, U, meta)
return _add_expression_container!(container, expr_key, expr_type, axs...; sparse = sparse)
return _add_expression_container!(
container,
expr_key,
expr_type,
axs...;
sparse = sparse,
)
end

function add_expression_container!(
Expand Down
12 changes: 10 additions & 2 deletions src/devices_models/devices/common/add_to_expression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,22 @@ function add_expressions!(
if fuel_curve isa PSY.FuelCurve
push!(names, PSY.get_name(d))
if !found_quad_fuel_functions
found_quad_fuel_functions = PSY.get_value_curve(fuel_curve) isa PSY.QuadraticCurve
found_quad_fuel_functions =
PSY.get_value_curve(fuel_curve) isa PSY.QuadraticCurve
end
end
end

if !isempty(names)
expr_type = found_quad_fuel_functions ? JuMP.QuadExpr : GAE
add_expression_container!(container, T(), D, names, time_steps; expr_type = expr_type)
add_expression_container!(
container,
T(),
D,
names,
time_steps;
expr_type = expr_type,
)
end
return
end
Expand Down

0 comments on commit bf76d05

Please sign in to comment.