Skip to content

Commit

Permalink
add FF slack to objective function
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-lara committed Sep 5, 2023
1 parent 3738c7b commit 94e4810
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/feedforward/feedforward_arguments.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ function _add_feedforward_slack_variables!(container::OptimizationContainer,
base_name = "$(T)_$(U)_{$(name), $(t)}",
lower_bound = 0.0
)
add_to_objective_invariant_expression!(
container,
variable_container[name, t] * BALANCE_SLACK_COST,
)
end

end
return
end
Expand Down
2 changes: 2 additions & 0 deletions test/test_basic_model_structs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ end
component_type = RenewableDispatch,
source = ActivePowerVariable,
affected_values = [OnStatusParameter],
use_slacks = true,
)

@test_throws ErrorException LowerBoundFeedforward(
component_type = RenewableDispatch,
source = ActivePowerVariable,
affected_values = [OnStatusParameter],
use_slacks = true,
)

@test_throws ErrorException SemiContinuousFeedforward(
Expand Down

0 comments on commit 94e4810

Please sign in to comment.