mirror of
https://github.com/ANL-CEEESA/RELOG.git
synced 2025-12-05 23:38:52 -06:00
Implement initial plant capacity
This commit is contained in:
1
test/fixtures/s1.json
vendored
1
test/fixtures/s1.json
vendored
@@ -103,6 +103,7 @@
|
||||
"limit (tonne)": [1.0, 1.0]
|
||||
}
|
||||
},
|
||||
"initial capacity (tonne)": 500.0,
|
||||
"capacities (tonne)": {
|
||||
"250.0": {
|
||||
"opening cost ($)": [500.0, 500.0],
|
||||
|
||||
@@ -29,6 +29,7 @@ function instance_parse_test()
|
||||
@test plant.input.name == "P1"
|
||||
@test plant.latitude == 0
|
||||
@test plant.longitude == 0
|
||||
@test plant.initial_capacity == 500.0
|
||||
|
||||
@test length(plant.sizes) == 2
|
||||
@test plant.sizes[1].capacity == 250
|
||||
@@ -64,6 +65,7 @@ function instance_parse_test()
|
||||
@test plant.input.name == "P2"
|
||||
@test plant.latitude == 25
|
||||
@test plant.longitude == 65
|
||||
@test plant.initial_capacity == 0
|
||||
|
||||
@test length(plant.sizes) == 2
|
||||
@test plant.sizes[1].capacity == 1000.0
|
||||
|
||||
@@ -21,9 +21,12 @@ function model_build_test()
|
||||
@test length(model[:plant_dispose]) == 16
|
||||
@test length(model[:open_plant]) == 12
|
||||
@test length(model[:capacity]) == 12
|
||||
@test length(model[:expansion]) == 12
|
||||
@test length(model[:expansion]) == 18
|
||||
|
||||
l1 = process_node_by_location_name["L1"]
|
||||
@test model[:is_open][l1, 0] == 1
|
||||
@test model[:expansion][l1, 0] == 250
|
||||
|
||||
v = model[:capacity][l1, 1]
|
||||
@test lower_bound(v) == 0.0
|
||||
@test upper_bound(v) == 1000.0
|
||||
@@ -35,5 +38,9 @@ function model_build_test()
|
||||
v = model[:plant_dispose][shipping_node_by_loc_and_prod_names["L1", "P2"], 1]
|
||||
@test lower_bound(v) == 0.0
|
||||
@test upper_bound(v) == 1.0
|
||||
|
||||
l2 = process_node_by_location_name["L2"]
|
||||
@test model[:is_open][l2, 0] == 0
|
||||
@test model[:expansion][l2, 0] == 0
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user