Skip to content

Commit 83c84d5

Browse files
committed
removing unused functions for C2N data handling and references to unused C2N_specs dataframe
1 parent 63994c6 commit 83c84d5

1 file changed

Lines changed: 0 additions & 105 deletions

File tree

src/ABCEfunctions.jl

Lines changed: 0 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,8 @@ module ABCEfunctions
1919
using ArgParse, CPLEX,
2020
Requires, SQLite, DataFrames, CSV, JuMP, GLPK, Cbc, Logging, Tables, HiGHS, Statistics
2121

22-
# Use CPLEX if available
23-
#function __init__()
24-
# @require CPLEX = "a076750e-1247-5638-91d2-ce28b192dca0" @eval using CPLEX
25-
#end
26-
2722
include("./dispatch.jl")
2823
using .Dispatch
29-
include("./C2N_projects.jl")
30-
using .C2N
3124
include("./income_statement.jl")
3225
using .ISpf
3326

@@ -104,39 +97,6 @@ function set_up_local_paths(settings, abce_abs_path)
10497
end
10598

10699

107-
function validate_project_data(db, settings, unit_specs, C2N_specs)
108-
for unit_type in unit_specs[!, :unit_type]
109-
if occursin("C2N", unit_type)
110-
unit_type_data =
111-
filter(:unit_type => x -> x == unit_type, unit_specs)[1, :]
112-
113-
# Dummy data for schedule retrieval
114-
lag = 0
115-
fc_pd = 70
116-
current_pd = 0
117-
118-
capex_tl, activity_schedule = project_C2N_capex(
119-
db,
120-
settings,
121-
unit_type_data,
122-
lag,
123-
fc_pd,
124-
current_pd,
125-
C2N_specs,
126-
)
127-
128-
unit_specs[
129-
(unit_specs.unit_type .== unit_type),
130-
:construction_duration,
131-
] .= size(capex_tl)[1]
132-
end
133-
end
134-
135-
return unit_specs
136-
137-
end
138-
139-
140100
function set_forecast_period(unit_specs, num_lags)
141101
# Compute forecast period as the maximum possible project horizon, based
142102
# on the sum of maximum lead time, maximum construction duration,
@@ -561,7 +521,6 @@ function set_up_project_alternatives(
561521
agent_params,
562522
db,
563523
current_pd,
564-
C2N_specs,
565524
dispatch_results,
566525
)
567526
PA_summaries = create_PA_summaries(settings, unit_specs, asset_counts)
@@ -579,7 +538,6 @@ function set_up_project_alternatives(
579538
PA,
580539
fc_pd,
581540
current_pd,
582-
C2N_specs,
583541
agent_id,
584542
agent_params,
585543
dispatch_results,
@@ -704,7 +662,6 @@ function create_PA_subprojects(
704662
PA,
705663
fc_pd,
706664
current_pd,
707-
C2N_specs,
708665
agent_id,
709666
agent_params,
710667
dispatch_results,
@@ -727,7 +684,6 @@ function create_PA_subprojects(
727684
subproject,
728685
fc_pd,
729686
current_pd,
730-
C2N_specs,
731687
agent_id,
732688
agent_params,
733689
dispatch_results,
@@ -795,7 +751,6 @@ function forecast_subproject_financials(
795751
subproject,
796752
fc_pd,
797753
current_pd,
798-
C2N_specs,
799754
agent_id,
800755
agent_params,
801756
dispatch_results,
@@ -836,7 +791,6 @@ function forecast_subproject_financials(
836791
unit_type_data,
837792
subproject,
838793
current_pd,
839-
C2N_specs,
840794
deepcopy(subproject_fs),
841795
)
842796

@@ -896,7 +850,6 @@ function forecast_capex(
896850
unit_type_data,
897851
subproject,
898852
current_pd,
899-
C2N_specs,
900853
fs_copy,
901854
)
902855
capex_per_pd = (
@@ -918,64 +871,6 @@ function forecast_capex(
918871
end
919872

920873

921-
function project_C2N_capex(
922-
db,
923-
settings,
924-
unit_type_data,
925-
lag,
926-
fc_pd,
927-
current_pd,
928-
C2N_specs,
929-
)
930-
assumption = settings["simulation"]["C2N_assumption"]
931-
# Set the project parameters
932-
if occursin("C2N0", unit_type_data[:unit_type])
933-
conversion_type = "greenfield"
934-
if occursin("PWR", unit_type_data[:unit_type])
935-
rxtr_type = "PWR"
936-
elseif occursin("HTGR", unit_type_data[:unit_type])
937-
rxtr_type = "HTGR"
938-
else
939-
rxtr_type = "SFR"
940-
end
941-
942-
data = deepcopy(C2N_specs[conversion_type][rxtr_type])
943-
944-
else
945-
if occursin("C2N1", unit_type_data[:unit_type])
946-
conversion_type = "electrical"
947-
rxtr_type = "PWR"
948-
elseif occursin("C2N2", unit_type_data[:unit_type])
949-
conversion_type = "steam_noTES"
950-
rxtr_type = "HTGR"
951-
else
952-
conversion_type = "steam_TES"
953-
rxtr_type = "SFR"
954-
end
955-
data = deepcopy(C2N_specs[conversion_type][assumption])
956-
end
957-
958-
# Scale cost component data to match unit type specification data
959-
for key in keys(data)
960-
data[key]["cost_rem"] = data[key]["cost_rem"] * unit_type_data[:overnight_capital_cost]
961-
end
962-
963-
# Develop the C2N capex profile
964-
capex_tl, activity_schedule = C2N.create_C2N_capex_timeline(
965-
db,
966-
conversion_type,
967-
rxtr_type,
968-
current_pd,
969-
lag,
970-
fc_pd,
971-
data,
972-
unit_type_data,
973-
)
974-
975-
return capex_tl, activity_schedule
976-
end
977-
978-
979874
function get_capex_end(fs_copy)
980875
# Find the end of the capex accumulation period
981876
capex_end = size(fs_copy)[1]

0 commit comments

Comments
 (0)