Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-lara committed Nov 30, 2024
1 parent 5e7a3cb commit ed6210d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/test_device_thermal_generation_constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1060,21 +1060,23 @@ end
ts,
)

set_device_model!(template, ThermalStandard, ThermalBasicUnitCommitment)
# There is no free MIQP solver, we need to use ThermalDisptchNoMin for testing
set_device_model!(template, ThermalStandard, ThermalDispatchNoMin)
set_device_model!(template, PowerLoad, StaticPowerLoad)
set_device_model!(template, RenewableDispatch, RenewableFullDispatch)

model = DecisionModel(
template,
sys;
name = "UC",
optimizer = HiGHS_optimizer,
optimizer = ipopt_optimizer,
system_to_file = false,
store_variable_names = true,
optimizer_solve_log_print = false,
)
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT
moi_tests(model, 648, 0, 312, 120, 192, true)
solve!(model)
moi_tests(model, 288, 0, 192, 120, 72, false)
container = PSI.get_optimization_container(model)
@test isa(PSI.get_invariant_terms(PSI.get_objective_expression(container)), JuMP.QuadExpr)
end

0 comments on commit ed6210d

Please sign in to comment.