Remove unused code and test resources

feature/lint
Alinson S. Xavier 4 years ago
parent 630ae49d4a
commit a333ab0b04

@ -1,7 +0,0 @@
plant type,location name,year,emission type,emission amount (tonne)
Rare Earth Recycling Plant,"Sebastian, Arkansas",1,CO2,40711.3
Rare Earth Recycling Plant,"Stanly, North Carolina",1,CO2,23336.47
Rare Earth Recycling Plant,"Lynn, Texas",1,CO2,52927.44
Mega Plant,"Sebastian, Arkansas",1,CO2,110818.84
Mega Plant,"District of Columbia, District of Columbia",1,CO2,63523.43
Mega Plant,"Maricopa, Arizona",1,CO2,144072.0
1 plant type location name year emission type emission amount (tonne)
2 Rare Earth Recycling Plant Sebastian, Arkansas 1 CO2 40711.3
3 Rare Earth Recycling Plant Stanly, North Carolina 1 CO2 23336.47
4 Rare Earth Recycling Plant Lynn, Texas 1 CO2 52927.44
5 Mega Plant Sebastian, Arkansas 1 CO2 110818.84
6 Mega Plant District of Columbia, District of Columbia 1 CO2 63523.43
7 Mega Plant Maricopa, Arizona 1 CO2 144072.0

@ -1,37 +0,0 @@
plant type,location name,year,product name,amount produced (tonne),amount sent (tonne),amount disposed (tonne),disposal cost ($)
Rare Earth Recycling Plant,"Sebastian, Arkansas",1,rare earth cela,18045.12,0.0,18045.12,0.0
Rare Earth Recycling Plant,"Sebastian, Arkansas",1,rare earth diddy,7624.02,0.0,7624.02,0.0
Rare Earth Recycling Plant,"Sebastian, Arkansas",1,salt,6434.8,0.0,6434.8,324314.03
Rare Earth Recycling Plant,"Sebastian, Arkansas",1,rare earth misch,2188.78,0.0,2188.78,0.0
Rare Earth Recycling Plant,"Stanly, North Carolina",1,rare earth cela,10343.8,0.0,10343.8,0.0
Rare Earth Recycling Plant,"Stanly, North Carolina",1,rare earth diddy,4370.23,0.0,4370.23,0.0
Rare Earth Recycling Plant,"Stanly, North Carolina",1,salt,3688.55,0.0,3688.55,185902.85
Rare Earth Recycling Plant,"Stanly, North Carolina",1,rare earth misch,1254.65,0.0,1254.65,0.0
Rare Earth Recycling Plant,"Lynn, Texas",1,rare earth cela,23459.88,0.0,23459.88,0.0
Rare Earth Recycling Plant,"Lynn, Texas",1,rare earth diddy,9911.74,0.0,9911.74,0.0
Rare Earth Recycling Plant,"Lynn, Texas",1,salt,8365.68,0.0,8365.68,421630.2
Rare Earth Recycling Plant,"Lynn, Texas",1,rare earth misch,2845.56,0.0,2845.56,0.0
Mega Plant,"Sebastian, Arkansas",1,iron-nickel scrap,35656.28,0.0,35656.28,0.0
Mega Plant,"Sebastian, Arkansas",1,mixed-hydroxides,73141.86,0.0,73141.86,0.0
Mega Plant,"Sebastian, Arkansas",1,leach residue,31470.35,0.0,31470.35,6.38848022e6
Mega Plant,"Sebastian, Arkansas",1,plastic pack,96503.37,0.0,96503.37,4.86376966e6
Mega Plant,"Sebastian, Arkansas",1,salt,285304.6,0.0,285304.6,1.437935192e7
Mega Plant,"Sebastian, Arkansas",1,rare earth mix,44145.84,44145.84,0.0,0.0
Mega Plant,"Sebastian, Arkansas",1,nickel-iron scrap,178655.26,0.0,178655.26,0.0
Mega Plant,"Sebastian, Arkansas",1,nickel,37931.36,0.0,37931.36,0.0
Mega Plant,"District of Columbia, District of Columbia",1,iron-nickel scrap,20438.84,0.0,20438.84,0.0
Mega Plant,"District of Columbia, District of Columbia",1,mixed-hydroxides,41926.28,0.0,41926.28,0.0
Mega Plant,"District of Columbia, District of Columbia",1,leach residue,18039.39,0.0,18039.39,3.66199595e6
Mega Plant,"District of Columbia, District of Columbia",1,plastic pack,55317.53,0.0,55317.53,2.78800343e6
Mega Plant,"District of Columbia, District of Columbia",1,salt,163541.92,0.0,163541.92,8.24251257e6
Mega Plant,"District of Columbia, District of Columbia",1,rare earth mix,25305.22,25305.22,0.0,0.0
Mega Plant,"District of Columbia, District of Columbia",1,nickel-iron scrap,102408.52,0.0,102408.52,0.0
Mega Plant,"District of Columbia, District of Columbia",1,nickel,21742.96,0.0,21742.96,0.0
Mega Plant,"Maricopa, Arizona",1,iron-nickel scrap,46355.57,0.0,46355.57,0.0
Mega Plant,"Maricopa, Arizona",1,mixed-hydroxides,95089.37,0.0,95089.37,0.0
Mega Plant,"Maricopa, Arizona",1,leach residue,40913.58,0.0,40913.58,8.30545698e6
Mega Plant,"Maricopa, Arizona",1,plastic pack,125460.91,0.0,125460.91,6.32322998e6
Mega Plant,"Maricopa, Arizona",1,salt,370915.31,0.0,370915.31,1.869413141e7
Mega Plant,"Maricopa, Arizona",1,rare earth mix,57392.58,57392.58,0.0,0.0
Mega Plant,"Maricopa, Arizona",1,nickel-iron scrap,232263.93,0.0,232263.93,0.0
Mega Plant,"Maricopa, Arizona",1,nickel,49313.34,0.0,49313.34,0.0
1 plant type location name year product name amount produced (tonne) amount sent (tonne) amount disposed (tonne) disposal cost ($)
2 Rare Earth Recycling Plant Sebastian, Arkansas 1 rare earth cela 18045.12 0.0 18045.12 0.0
3 Rare Earth Recycling Plant Sebastian, Arkansas 1 rare earth diddy 7624.02 0.0 7624.02 0.0
4 Rare Earth Recycling Plant Sebastian, Arkansas 1 salt 6434.8 0.0 6434.8 324314.03
5 Rare Earth Recycling Plant Sebastian, Arkansas 1 rare earth misch 2188.78 0.0 2188.78 0.0
6 Rare Earth Recycling Plant Stanly, North Carolina 1 rare earth cela 10343.8 0.0 10343.8 0.0
7 Rare Earth Recycling Plant Stanly, North Carolina 1 rare earth diddy 4370.23 0.0 4370.23 0.0
8 Rare Earth Recycling Plant Stanly, North Carolina 1 salt 3688.55 0.0 3688.55 185902.85
9 Rare Earth Recycling Plant Stanly, North Carolina 1 rare earth misch 1254.65 0.0 1254.65 0.0
10 Rare Earth Recycling Plant Lynn, Texas 1 rare earth cela 23459.88 0.0 23459.88 0.0
11 Rare Earth Recycling Plant Lynn, Texas 1 rare earth diddy 9911.74 0.0 9911.74 0.0
12 Rare Earth Recycling Plant Lynn, Texas 1 salt 8365.68 0.0 8365.68 421630.2
13 Rare Earth Recycling Plant Lynn, Texas 1 rare earth misch 2845.56 0.0 2845.56 0.0
14 Mega Plant Sebastian, Arkansas 1 iron-nickel scrap 35656.28 0.0 35656.28 0.0
15 Mega Plant Sebastian, Arkansas 1 mixed-hydroxides 73141.86 0.0 73141.86 0.0
16 Mega Plant Sebastian, Arkansas 1 leach residue 31470.35 0.0 31470.35 6.38848022e6
17 Mega Plant Sebastian, Arkansas 1 plastic pack 96503.37 0.0 96503.37 4.86376966e6
18 Mega Plant Sebastian, Arkansas 1 salt 285304.6 0.0 285304.6 1.437935192e7
19 Mega Plant Sebastian, Arkansas 1 rare earth mix 44145.84 44145.84 0.0 0.0
20 Mega Plant Sebastian, Arkansas 1 nickel-iron scrap 178655.26 0.0 178655.26 0.0
21 Mega Plant Sebastian, Arkansas 1 nickel 37931.36 0.0 37931.36 0.0
22 Mega Plant District of Columbia, District of Columbia 1 iron-nickel scrap 20438.84 0.0 20438.84 0.0
23 Mega Plant District of Columbia, District of Columbia 1 mixed-hydroxides 41926.28 0.0 41926.28 0.0
24 Mega Plant District of Columbia, District of Columbia 1 leach residue 18039.39 0.0 18039.39 3.66199595e6
25 Mega Plant District of Columbia, District of Columbia 1 plastic pack 55317.53 0.0 55317.53 2.78800343e6
26 Mega Plant District of Columbia, District of Columbia 1 salt 163541.92 0.0 163541.92 8.24251257e6
27 Mega Plant District of Columbia, District of Columbia 1 rare earth mix 25305.22 25305.22 0.0 0.0
28 Mega Plant District of Columbia, District of Columbia 1 nickel-iron scrap 102408.52 0.0 102408.52 0.0
29 Mega Plant District of Columbia, District of Columbia 1 nickel 21742.96 0.0 21742.96 0.0
30 Mega Plant Maricopa, Arizona 1 iron-nickel scrap 46355.57 0.0 46355.57 0.0
31 Mega Plant Maricopa, Arizona 1 mixed-hydroxides 95089.37 0.0 95089.37 0.0
32 Mega Plant Maricopa, Arizona 1 leach residue 40913.58 0.0 40913.58 8.30545698e6
33 Mega Plant Maricopa, Arizona 1 plastic pack 125460.91 0.0 125460.91 6.32322998e6
34 Mega Plant Maricopa, Arizona 1 salt 370915.31 0.0 370915.31 1.869413141e7
35 Mega Plant Maricopa, Arizona 1 rare earth mix 57392.58 57392.58 0.0 0.0
36 Mega Plant Maricopa, Arizona 1 nickel-iron scrap 232263.93 0.0 232263.93 0.0
37 Mega Plant Maricopa, Arizona 1 nickel 49313.34 0.0 49313.34 0.0

@ -1,7 +0,0 @@
plant type,location name,year,latitude (deg),longitude (deg),capacity (tonne),amount processed (tonne),utilization factor (%),energy (GJ),opening cost ($),expansion cost ($),fixed operating cost ($),variable operating cost ($),total cost ($)
Rare Earth Recycling Plant,"Sebastian, Arkansas",1,35.23416,-94.212943,44145.84,44145.84,100.0,1.13360359e6,6.9926855e6,1.793555439e7,1.677420707e7,1.0080261442e8,1.4250506138e8
Rare Earth Recycling Plant,"Stanly, North Carolina",1,35.334445,-80.223231,25305.22,25305.22,100.0,649802.71,7.1653444e6,9.98954108e6,1.126536154e7,5.778193764e7,8.620218466e7
Rare Earth Recycling Plant,"Lynn, Texas",1,33.166444,-101.793455,57392.58,57392.58,100.0,1.47376145e6,7.4243328e6,2.5154042e7,2.06474474e7,1.310502261e8,1.842760483e8
Mega Plant,"Sebastian, Arkansas",1,35.23416,-94.212943,553817.3,553817.3,100.0,3.08574408e6,1.6858178e7,4.012879371e7,3.834652057e7,4.2898688058e8,5.2432037286e8
Mega Plant,"District of Columbia, District of Columbia",1,38.930028,-76.974164,317458.4,317458.4,100.0,1.76880602e6,2.12288167e7,2.746685387e7,2.602109584e7,2.4590327664e8,3.2062004305e8
Mega Plant,"Maricopa, Arizona",1,33.647365,-111.893669,720000.0,720000.0,100.0,4.0116763e6,2.10206911e7,6.60955172e7,4.70124619e7,5.57712e8,6.918406702e8
1 plant type location name year latitude (deg) longitude (deg) capacity (tonne) amount processed (tonne) utilization factor (%) energy (GJ) opening cost ($) expansion cost ($) fixed operating cost ($) variable operating cost ($) total cost ($)
2 Rare Earth Recycling Plant Sebastian, Arkansas 1 35.23416 -94.212943 44145.84 44145.84 100.0 1.13360359e6 6.9926855e6 1.793555439e7 1.677420707e7 1.0080261442e8 1.4250506138e8
3 Rare Earth Recycling Plant Stanly, North Carolina 1 35.334445 -80.223231 25305.22 25305.22 100.0 649802.71 7.1653444e6 9.98954108e6 1.126536154e7 5.778193764e7 8.620218466e7
4 Rare Earth Recycling Plant Lynn, Texas 1 33.166444 -101.793455 57392.58 57392.58 100.0 1.47376145e6 7.4243328e6 2.5154042e7 2.06474474e7 1.310502261e8 1.842760483e8
5 Mega Plant Sebastian, Arkansas 1 35.23416 -94.212943 553817.3 553817.3 100.0 3.08574408e6 1.6858178e7 4.012879371e7 3.834652057e7 4.2898688058e8 5.2432037286e8
6 Mega Plant District of Columbia, District of Columbia 1 38.930028 -76.974164 317458.4 317458.4 100.0 1.76880602e6 2.12288167e7 2.746685387e7 2.602109584e7 2.4590327664e8 3.2062004305e8
7 Mega Plant Maricopa, Arizona 1 33.647365 -111.893669 720000.0 720000.0 100.0 4.0116763e6 2.10206911e7 6.60955172e7 4.70124619e7 5.57712e8 6.918406702e8

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -4,30 +4,7 @@
using RELOG, JSON, GZip using RELOG, JSON, GZip
load_json_gz(filename) = JSON.parse(GZip.gzopen(filename))
# function check(func, expected_csv_filename::String)
# solution = load_json_gz("fixtures/nimh_solution.json.gz")
# actual_csv_filename = tempname()
# func(solution, actual_csv_filename)
# @test isfile(actual_csv_filename)
# if readlines(actual_csv_filename) != readlines(expected_csv_filename)
# out_filename = replace(expected_csv_filename, ".csv" => "_actual.csv")
# @error "$func: Unexpected CSV contents: $out_filename"
# write(out_filename, read(actual_csv_filename))
# @test false
# end
# end
@testset "Reports" begin @testset "Reports" begin
# @testset "from fixture" begin
# check(RELOG.write_plants_report, "fixtures/nimh_plants.csv")
# check(RELOG.write_plant_outputs_report, "fixtures/nimh_plant_outputs.csv")
# check(RELOG.write_plant_emissions_report, "fixtures/nimh_plant_emissions.csv")
# check(RELOG.write_transportation_report, "fixtures/nimh_transportation.csv")
# check(RELOG.write_transportation_emissions_report, "fixtures/nimh_transportation_emissions.csv")
# end
@testset "from solve" begin @testset "from solve" begin
solution = RELOG.solve("$(pwd())/../instances/s1.json") solution = RELOG.solve("$(pwd())/../instances/s1.json")
tmp_filename = tempname() tmp_filename = tempname()

Loading…
Cancel
Save