Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions test/test_electrolyzer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ end
# Test that there are no quadratic constraints for SimpleElectrolyzer types
@test isempty(all_constraints(m, QuadExpr, MOI.EqualTo{MOI.Float64}))
finalize(backend(m).optimizer.model)

# Test for stack lifetimes shorter than op_per_strat
𝒯 = TwoLevel(8, 2, SimpleTimes(20, 1); op_per_strat=8760)
stack_lifetime = 8000
# Run and test the model
m, case, modeltype = elec_test_case(𝒯; stack_cost, deficit_cost, stack_lifetime)
end

# Test set for the used load limits allowing for both production above and below capacity
Expand Down Expand Up @@ -251,10 +257,20 @@ end
𝒯 = TwoLevel(8, 2, SimpleTimes(20, 1); op_per_strat=8760)
deficit_cost = StrategicProfile([25, 25, 25, 25, 30])
stack_cost = FixedProfile(3e8)
stack_lifetime = 8000

# Run and test the model
m, case, modeltype = elec_test_case(𝒯; stack_cost, deficit_cost, stack_lifetime)
m, case, modeltype = elec_test_case(𝒯; stack_cost, deficit_cost)

# Overwrite the modeltype
modeltype = InvestmentModel(Dict(co2 => FixedProfile(0)), Dict(co2 => FixedProfile(0)), co2, 0.07)

# Create and run the model
m = create_model(case, modeltype)
set_optimizer(m, OPTIMIZER)
optimize!(m)

# Test the penalties
penalty_test(m, case)
end
@testset "With investment data" begin
# Specifying the input parameters
Expand Down
Loading