Skip to content

Commit

Permalink
Change all Float32 to Float64 (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnawin committed Oct 4, 2023
1 parent 6c3d2a2 commit 1336e53
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions src/input_tables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ struct NodeData
type::String # Producer/Consumer - maybe an enum?
active::Bool # Active or decomissioned
investable::Bool # Whether able to invest
variable_cost::Float32 # kEUR/MWh
investment_cost::Float32 # kEUR/MW/year
capacity::Float32 # MW
initial_capacity::Float32 # MW
peak_demand::Float32 # MW
variable_cost::Float64 # kEUR/MWh
investment_cost::Float64 # kEUR/MW/year
capacity::Float64 # MW
initial_capacity::Float64 # MW
peak_demand::Float64 # MW
end

struct EdgeData
Expand All @@ -18,29 +18,29 @@ struct EdgeData
to_node_id::Int # Node ID
active::Bool # Active or decomissioned
investable::Bool # Whether able to invest
variable_cost::Float32 # kEUR/MWh
investment_cost::Float32 # kEUR/MW/year
capacity::Float32 # MW
initial_capacity::Float32 # MW
variable_cost::Float64 # kEUR/MWh
investment_cost::Float64 # kEUR/MW/year
capacity::Float64 # MW
initial_capacity::Float64 # MW
end

struct EdgeProfiles
id::Int # Edge ID
rep_period_id::Int
time_step::Int
value::Float32 # p.u.
value::Float64 # p.u.
end

struct NodeProfiles
id::Int # Node ID
rep_period_id::Int
time_step::Int
value::Float32 # p.u.
value::Float64 # p.u.
end

struct RepPeriodData
id::Int
weight::Float32
weight::Float64
end

function validate_df(df::DataFrame, schema::DataType; fname::String = "", silent = false)
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ end
)
@test col_err == [:id]
@test col_type_err ==
[(:investable, Bool, String7), (:peak_demand, Float32, String7)]
[(:investable, Bool, String7), (:peak_demand, Float64, String7)]
end
end

0 comments on commit 1336e53

Please sign in to comment.