mirror of
https://github.com/ANL-CEEESA/UnitCommitment.jl.git
synced 2025-12-06 16:28:51 -06:00
Re-formatted the codes
This commit is contained in:
@@ -20,7 +20,7 @@ import UnitCommitment: AELMP
|
||||
# policy 1: allow offlines; consider startups
|
||||
aelmp_1 =
|
||||
UnitCommitment.compute_lmp(model, AELMP(), optimizer = HiGHS.Optimizer)
|
||||
@test aelmp_1["s1","B1", 1] ≈ 231.7 atol = 0.1
|
||||
@test aelmp_1["s1", "B1", 1] ≈ 231.7 atol = 0.1
|
||||
|
||||
# policy 2: do not allow offlines; but consider startups
|
||||
aelmp_2 = UnitCommitment.compute_lmp(
|
||||
@@ -31,5 +31,5 @@ import UnitCommitment: AELMP
|
||||
),
|
||||
optimizer = HiGHS.Optimizer,
|
||||
)
|
||||
@test aelmp_2["s1","B1", 1] ≈ 274.3 atol = 0.1
|
||||
@test aelmp_2["s1", "B1", 1] ≈ 274.3 atol = 0.1
|
||||
end
|
||||
|
||||
@@ -38,14 +38,14 @@ end
|
||||
# instance 3
|
||||
path = "$FIXTURES/lmp_simple_test_3.json.gz"
|
||||
lmp = solve_conventional_testcase(path)
|
||||
@test lmp["s1","A", 1] == 50.0
|
||||
@test lmp["s1","B", 1] == 70.0
|
||||
@test lmp["s1","C", 1] == 100.0
|
||||
@test lmp["s1", "A", 1] == 50.0
|
||||
@test lmp["s1", "B", 1] == 70.0
|
||||
@test lmp["s1", "C", 1] == 100.0
|
||||
|
||||
# instance 4
|
||||
path = "$FIXTURES/lmp_simple_test_4.json.gz"
|
||||
lmp = solve_conventional_testcase(path)
|
||||
@test lmp["s1","A", 1] == 50.0
|
||||
@test lmp["s1","B", 1] == 70.0
|
||||
@test lmp["s1","C", 1] == 90.0
|
||||
@test lmp["s1", "A", 1] == 50.0
|
||||
@test lmp["s1", "B", 1] == 70.0
|
||||
@test lmp["s1", "C", 1] == 90.0
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user