diff --git a/src/write_outputs/capacity_reserve_margin/write_reserve_margin_slack.jl b/src/write_outputs/capacity_reserve_margin/write_reserve_margin_slack.jl index 221241c278..53a79b3b11 100644 --- a/src/write_outputs/capacity_reserve_margin/write_reserve_margin_slack.jl +++ b/src/write_outputs/capacity_reserve_margin/write_reserve_margin_slack.jl @@ -11,7 +11,7 @@ function write_reserve_margin_slack(path::AbstractString, inputs::Dict, setup::D temp_ResMar_slack .*= ModelScalingFactor # Convert GW to MW end dfResMar_slack = hcat(dfResMar_slack, DataFrame(temp_ResMar_slack, [Symbol("t$t") for t in 1:T])) - CSV.write(joinpath(path, "ReserveMargin_prices_and_penalties.csv"), dftranspose(dfResMar_slack, false), header=false) + CSV.write(joinpath(path, "ReserveMargin_prices_and_penalties.csv"), dftranspose(dfResMar_slack, false), writeheader=false) return dfResMar_slack end diff --git a/src/write_outputs/capacity_reserve_margin/write_virtual_discharge.jl b/src/write_outputs/capacity_reserve_margin/write_virtual_discharge.jl index b093e984d9..44ac77738a 100644 --- a/src/write_outputs/capacity_reserve_margin/write_virtual_discharge.jl +++ b/src/write_outputs/capacity_reserve_margin/write_virtual_discharge.jl @@ -29,6 +29,6 @@ function write_virtual_discharge(path::AbstractString, inputs::Dict, setup::Dict total[:, 4:T+3] .= sum(virtual_discharge, dims = 1) rename!(total,auxNew_Names) dfVirtualDischarge = vcat(dfVirtualDischarge, total) - CSV.write(joinpath(path, "virtual_discharge.csv"), dftranspose(dfVirtualDischarge, false), header=false) + CSV.write(joinpath(path, "virtual_discharge.csv"), dftranspose(dfVirtualDischarge, false), writeheader=false) return dfVirtualDischarge end diff --git a/src/write_outputs/hydrogen/write_hourly_matching_prices.jl b/src/write_outputs/hydrogen/write_hourly_matching_prices.jl index c804d810c4..1e4188a0b6 100644 --- a/src/write_outputs/hydrogen/write_hourly_matching_prices.jl +++ b/src/write_outputs/hydrogen/write_hourly_matching_prices.jl @@ -11,7 +11,7 @@ function write_hourly_matching_prices(path::AbstractString, inputs::Dict, setup: auxNew_Names=[Symbol("Zone");[Symbol("t$t") for t in 1:T]] rename!(dfHourlyMatchPrices,auxNew_Names) - CSV.write(joinpath(path, "hourly_matching_prices.csv"), dftranspose(dfHourlyMatchPrices, false), header=false) + CSV.write(joinpath(path, "hourly_matching_prices.csv"), dftranspose(dfHourlyMatchPrices, false), writeheader=false) return dfHourlyMatchPrices end diff --git a/src/write_outputs/long_duration_storage/write_opwrap_lds_dstor.jl b/src/write_outputs/long_duration_storage/write_opwrap_lds_dstor.jl index a5ce31ec7b..c897823ef9 100644 --- a/src/write_outputs/long_duration_storage/write_opwrap_lds_dstor.jl +++ b/src/write_outputs/long_duration_storage/write_opwrap_lds_dstor.jl @@ -26,5 +26,5 @@ function write_opwrap_lds_dstor(path::AbstractString, inputs::Dict, setup::Dict, dfdStorage = hcat(dfdStorage, DataFrame(dsoc, :auto)) auxNew_Names=[Symbol("Resource");Symbol("Zone");[Symbol("w$t") for t in 1:W]] rename!(dfdStorage,auxNew_Names) - CSV.write(joinpath(path, "dStorage.csv"), dftranspose(dfdStorage, false), header=false) + CSV.write(joinpath(path, "dStorage.csv"), dftranspose(dfdStorage, false), writeheader=false) end diff --git a/src/write_outputs/long_duration_storage/write_opwrap_lds_stor_init.jl b/src/write_outputs/long_duration_storage/write_opwrap_lds_stor_init.jl index bf1bda48aa..b644d04385 100644 --- a/src/write_outputs/long_duration_storage/write_opwrap_lds_stor_init.jl +++ b/src/write_outputs/long_duration_storage/write_opwrap_lds_stor_init.jl @@ -26,5 +26,5 @@ function write_opwrap_lds_stor_init(path::AbstractString, inputs::Dict, setup::D dfStorageInit = hcat(dfStorageInit, DataFrame(socw, :auto)) auxNew_Names=[Symbol("Resource");Symbol("Zone");[Symbol("n$t") for t in 1:NPeriods]] rename!(dfStorageInit,auxNew_Names) - CSV.write(joinpath(path, "StorageInit.csv"), dftranspose(dfStorageInit, false), header=false) + CSV.write(joinpath(path, "StorageInit.csv"), dftranspose(dfStorageInit, false), writeheader=false) end diff --git a/src/write_outputs/reserves/write_reg.jl b/src/write_outputs/reserves/write_reg.jl index 8d8d51f217..7b69290f09 100644 --- a/src/write_outputs/reserves/write_reg.jl +++ b/src/write_outputs/reserves/write_reg.jl @@ -19,5 +19,5 @@ function write_reg(path::AbstractString, inputs::Dict, setup::Dict, EP::Model) total[!, 4:T+3] .= sum(reg, dims = 1) rename!(total,auxNew_Names) dfReg = vcat(dfReg, total) - CSV.write(joinpath(path, "reg.csv"), dftranspose(dfReg, false), header=false) + CSV.write(joinpath(path, "reg.csv"), dftranspose(dfReg, false), writeheader=false) end diff --git a/src/write_outputs/reserves/write_rsv.jl b/src/write_outputs/reserves/write_rsv.jl index 7db756e394..feb34a1943 100644 --- a/src/write_outputs/reserves/write_rsv.jl +++ b/src/write_outputs/reserves/write_rsv.jl @@ -24,5 +24,5 @@ function write_rsv(path::AbstractString, inputs::Dict, setup::Dict, EP::Model) rename!(total,auxNew_Names) rename!(unmet,auxNew_Names) dfRsv = vcat(dfRsv, unmet, total) - CSV.write(joinpath(path, "reg_dn.csv"), dftranspose(dfRsv, false), header=false) + CSV.write(joinpath(path, "reg_dn.csv"), dftranspose(dfRsv, false), writeheader=false) end diff --git a/src/write_outputs/transmission/write_transmission_flows.jl b/src/write_outputs/transmission/write_transmission_flows.jl index 28a6fddffa..22ce42ca7f 100644 --- a/src/write_outputs/transmission/write_transmission_flows.jl +++ b/src/write_outputs/transmission/write_transmission_flows.jl @@ -16,5 +16,5 @@ function write_transmission_flows(path::AbstractString, inputs::Dict, setup::Dic total[:, 3:T+2] .= sum(flow, dims = 1) rename!(total,auxNew_Names) dfFlow = vcat(dfFlow, total) - CSV.write(joinpath(path, "flow.csv"), dftranspose(dfFlow, false), header=false) + CSV.write(joinpath(path, "flow.csv"), dftranspose(dfFlow, false), writeheader=false) end diff --git a/src/write_outputs/transmission/write_transmission_losses.jl b/src/write_outputs/transmission/write_transmission_losses.jl index 374fa3d426..0bf70d298c 100644 --- a/src/write_outputs/transmission/write_transmission_losses.jl +++ b/src/write_outputs/transmission/write_transmission_losses.jl @@ -18,5 +18,5 @@ function write_transmission_losses(path::AbstractString, inputs::Dict, setup::Di total[:, 3:T+2] .= sum(tlosses, dims = 1) rename!(total,auxNew_Names) dfTLosses = vcat(dfTLosses, total) - CSV.write(joinpath(path, "tlosses.csv"), dftranspose(dfTLosses, false), header=false) + CSV.write(joinpath(path, "tlosses.csv"), dftranspose(dfTLosses, false), writeheader=false) end diff --git a/src/write_outputs/ucommit/write_commit.jl b/src/write_outputs/ucommit/write_commit.jl index 3e4eff5387..e3ece4b6e5 100644 --- a/src/write_outputs/ucommit/write_commit.jl +++ b/src/write_outputs/ucommit/write_commit.jl @@ -12,5 +12,5 @@ function write_commit(path::AbstractString, inputs::Dict, setup::Dict, EP::Model dfCommit = hcat(dfCommit, DataFrame(commit, :auto)) auxNew_Names=[Symbol("Resource");Symbol("Zone");[Symbol("t$t") for t in 1:T]] rename!(dfCommit,auxNew_Names) - CSV.write(joinpath(path, "commit.csv"), dftranspose(dfCommit, false), header=false) + CSV.write(joinpath(path, "commit.csv"), dftranspose(dfCommit, false), writeheader=false) end diff --git a/src/write_outputs/ucommit/write_shutdown.jl b/src/write_outputs/ucommit/write_shutdown.jl index f524fb4daf..5b4ecd4c78 100644 --- a/src/write_outputs/ucommit/write_shutdown.jl +++ b/src/write_outputs/ucommit/write_shutdown.jl @@ -18,5 +18,5 @@ function write_shutdown(path::AbstractString, inputs::Dict, setup::Dict, EP::Mod total[:, 4:T+3] .= sum(shut, dims = 1) rename!(total,auxNew_Names) dfShutdown = vcat(dfShutdown, total) - CSV.write(joinpath(path, "shutdown.csv"), dftranspose(dfShutdown, false), header=false) + CSV.write(joinpath(path, "shutdown.csv"), dftranspose(dfShutdown, false), writeheader=false) end diff --git a/src/write_outputs/ucommit/write_start.jl b/src/write_outputs/ucommit/write_start.jl index 71aa7b723e..ea9c2028b5 100644 --- a/src/write_outputs/ucommit/write_start.jl +++ b/src/write_outputs/ucommit/write_start.jl @@ -18,5 +18,5 @@ function write_start(path::AbstractString, inputs::Dict, setup::Dict, EP::Model) total[:, 4:T+3] .= sum(start, dims = 1) rename!(total,auxNew_Names) dfStart = vcat(dfStart, total) - CSV.write(joinpath(path, "start.csv"), dftranspose(dfStart, false), header=false) + CSV.write(joinpath(path, "start.csv"), dftranspose(dfStart, false), writeheader=false) end diff --git a/src/write_outputs/write_charge.jl b/src/write_outputs/write_charge.jl index 7913799c6f..e86d285d7c 100644 --- a/src/write_outputs/write_charge.jl +++ b/src/write_outputs/write_charge.jl @@ -42,6 +42,6 @@ function write_charge(path::AbstractString, inputs::Dict, setup::Dict, EP::Model total[:, 4:T+3] .= sum(charge, dims = 1) rename!(total,auxNew_Names) dfCharge = vcat(dfCharge, total) - CSV.write(joinpath(path, "charge.csv"), dftranspose(dfCharge, false), header=false) + CSV.write(joinpath(path, "charge.csv"), dftranspose(dfCharge, false), writeheader=false) return dfCharge end diff --git a/src/write_outputs/write_co2.jl b/src/write_outputs/write_co2.jl index b06c9d8802..901f92a4aa 100644 --- a/src/write_outputs/write_co2.jl +++ b/src/write_outputs/write_co2.jl @@ -31,7 +31,7 @@ function write_co2_emissions_plant(path::AbstractString, inputs::Dict, setup::Di total = DataFrame(["Total" 0 sum(dfEmissions_plant[!, :AnnualSum]) fill(0.0, (1, T))], auxNew_Names) total[!, 4:T+3] .= sum(emissions_plant, dims=1) dfEmissions_plant = vcat(dfEmissions_plant, total) - CSV.write(joinpath(path, "emissions_plant.csv"), dftranspose(dfEmissions_plant, false), header=false) + CSV.write(joinpath(path, "emissions_plant.csv"), dftranspose(dfEmissions_plant, false), writeheader=false) end function write_co2_capture_plant(path::AbstractString, inputs::Dict, setup::Dict, EP::Model) @@ -58,6 +58,6 @@ function write_co2_capture_plant(path::AbstractString, inputs::Dict, setup::Dict total[!, 4:T+3] .= sum(emissions_captured_plant, dims=1) dfCapturedEmissions_plant = vcat(dfCapturedEmissions_plant, total) - CSV.write(joinpath(path, "captured_emissions_plant.csv"), dftranspose(dfCapturedEmissions_plant, false), header=false) + CSV.write(joinpath(path, "captured_emissions_plant.csv"), dftranspose(dfCapturedEmissions_plant, false), writeheader=false) end end diff --git a/src/write_outputs/write_curtailment.jl b/src/write_outputs/write_curtailment.jl index 18cb78d2af..d64629b1df 100644 --- a/src/write_outputs/write_curtailment.jl +++ b/src/write_outputs/write_curtailment.jl @@ -42,6 +42,6 @@ function write_curtailment(path::AbstractString, inputs::Dict, setup::Dict, EP:: total[:, 4:T+3] .= sum(curtailment, dims = 1) rename!(total,auxNew_Names) dfCurtailment = vcat(dfCurtailment, total) - CSV.write(joinpath(path, "curtail.csv"), dftranspose(dfCurtailment, false), header=false) + CSV.write(joinpath(path, "curtail.csv"), dftranspose(dfCurtailment, false), writeheader=false) return dfCurtailment end diff --git a/src/write_outputs/write_emissions.jl b/src/write_outputs/write_emissions.jl index 53129e81bc..f29bdbb488 100644 --- a/src/write_outputs/write_emissions.jl +++ b/src/write_outputs/write_emissions.jl @@ -77,5 +77,5 @@ function write_emissions(path::AbstractString, inputs::Dict, setup::Dict, EP::Mo rename!(total,auxNew_Names) dfEmissions = vcat(dfEmissions, total) end - CSV.write(joinpath(path, "emissions.csv"), dftranspose(dfEmissions, false), header=false) + CSV.write(joinpath(path, "emissions.csv"), dftranspose(dfEmissions, false), writeheader=false) end diff --git a/src/write_outputs/write_fuel_consumption.jl b/src/write_outputs/write_fuel_consumption.jl index 08da77ce2c..820076f1d4 100644 --- a/src/write_outputs/write_fuel_consumption.jl +++ b/src/write_outputs/write_fuel_consumption.jl @@ -41,7 +41,7 @@ function write_fuel_consumption_ts(path::AbstractString, inputs::Dict, setup::Di dfPlantFuel_TS = hcat(dfPlantFuel_TS, DataFrame(tempts, [Symbol("t$t") for t in 1:T])) CSV.write(joinpath(path, "FuelConsumption_plant_MMBTU.csv"), - dftranspose(dfPlantFuel_TS, false), header=false) + dftranspose(dfPlantFuel_TS, false), writeheader=false) end diff --git a/src/write_outputs/write_nse.jl b/src/write_outputs/write_nse.jl index ae896fe416..ecc1c72c61 100644 --- a/src/write_outputs/write_nse.jl +++ b/src/write_outputs/write_nse.jl @@ -24,6 +24,6 @@ function write_nse(path::AbstractString, inputs::Dict, setup::Dict, EP::Model) rename!(total,auxNew_Names) dfNse = vcat(dfNse, total) - CSV.write(joinpath(path, "nse.csv"), dftranspose(dfNse, false), header=false) + CSV.write(joinpath(path, "nse.csv"), dftranspose(dfNse, false), writeheader=false) return dfNse end diff --git a/src/write_outputs/write_power.jl b/src/write_outputs/write_power.jl index 7e1cc986da..4db4c294db 100644 --- a/src/write_outputs/write_power.jl +++ b/src/write_outputs/write_power.jl @@ -27,6 +27,6 @@ function write_power(path::AbstractString, inputs::Dict, setup::Dict, EP::Model) rename!(total,auxNew_Names) dfPower = vcat(dfPower, total) - CSV.write(joinpath(path, "power.csv"), dftranspose(dfPower, false), header=false) + CSV.write(joinpath(path, "power.csv"), dftranspose(dfPower, false), writeheader=false) return dfPower end diff --git a/src/write_outputs/write_power_balance.jl b/src/write_outputs/write_power_balance.jl index 82bd6e2b27..69ec216d44 100644 --- a/src/write_outputs/write_power_balance.jl +++ b/src/write_outputs/write_power_balance.jl @@ -61,5 +61,5 @@ function write_power_balance(path::AbstractString, inputs::Dict, setup::Dict, EP dfPowerBalance = hcat(dfPowerBalance, DataFrame(powerbalance, :auto)) auxNew_Names = [Symbol("BalanceComponent"); Symbol("Zone"); Symbol("AnnualSum"); [Symbol("t$t") for t in 1:T]] rename!(dfPowerBalance,auxNew_Names) - CSV.write(joinpath(path, "power_balance.csv"), dftranspose(dfPowerBalance, false), header=false) + CSV.write(joinpath(path, "power_balance.csv"), dftranspose(dfPowerBalance, false), writeheader=false) end diff --git a/src/write_outputs/write_price.jl b/src/write_outputs/write_price.jl index 3bb03c130b..0a2f743ff9 100644 --- a/src/write_outputs/write_price.jl +++ b/src/write_outputs/write_price.jl @@ -18,7 +18,7 @@ function write_price(path::AbstractString, inputs::Dict, setup::Dict, EP::Model) rename!(dfPrice,auxNew_Names) ## Linear configuration final output - CSV.write(joinpath(path, "prices.csv"), dftranspose(dfPrice, false), header=false) + CSV.write(joinpath(path, "prices.csv"), dftranspose(dfPrice, false), writeheader=false) return dfPrice end diff --git a/src/write_outputs/write_reliability.jl b/src/write_outputs/write_reliability.jl index ce5cd34efd..6f283db048 100644 --- a/src/write_outputs/write_reliability.jl +++ b/src/write_outputs/write_reliability.jl @@ -16,6 +16,6 @@ function write_reliability(path::AbstractString, inputs::Dict, setup::Dict, EP:: auxNew_Names=[Symbol("Zone");[Symbol("t$t") for t in 1:T]] rename!(dfReliability,auxNew_Names) - CSV.write(joinpath(path, "reliability.csv"), dftranspose(dfReliability, false), header=false) + CSV.write(joinpath(path, "reliability.csv"), dftranspose(dfReliability, false), writeheader=false) end diff --git a/src/write_outputs/write_storage.jl b/src/write_outputs/write_storage.jl index b8d2167dba..69fe2f433d 100644 --- a/src/write_outputs/write_storage.jl +++ b/src/write_outputs/write_storage.jl @@ -38,5 +38,5 @@ function write_storage(path::AbstractString, inputs::Dict,setup::Dict, EP::Model dfStorage = hcat(dfStorage, DataFrame(storagevcapvalue, :auto)) auxNew_Names=[Symbol("Resource");Symbol("Zone");[Symbol("t$t") for t in 1:T]] rename!(dfStorage,auxNew_Names) - CSV.write(joinpath(path, "storage.csv"), dftranspose(dfStorage, false), header=false) + CSV.write(joinpath(path, "storage.csv"), dftranspose(dfStorage, false), writeheader=false) end diff --git a/src/write_outputs/write_storagedual.jl b/src/write_outputs/write_storagedual.jl index 53a99f9603..7b762df563 100644 --- a/src/write_outputs/write_storagedual.jl +++ b/src/write_outputs/write_storagedual.jl @@ -59,5 +59,5 @@ function write_storagedual(path::AbstractString, inputs::Dict, setup::Dict, EP:: dfStorageDual=hcat(dfStorageDual, DataFrame(dual_values, :auto)) rename!(dfStorageDual,[Symbol("Resource");Symbol("Zone");[Symbol("t$t") for t in 1:T]]) - CSV.write(joinpath(path, "storagebal_duals.csv"), dftranspose(dfStorageDual, false), header=false) + CSV.write(joinpath(path, "storagebal_duals.csv"), dftranspose(dfStorageDual, false), writeheader=false) end diff --git a/src/write_outputs/write_vre_stor.jl b/src/write_outputs/write_vre_stor.jl index 3e2a75788a..5c74718d24 100644 --- a/src/write_outputs/write_vre_stor.jl +++ b/src/write_outputs/write_vre_stor.jl @@ -307,7 +307,7 @@ function write_vre_stor_charge(path::AbstractString, inputs::Dict, setup::Dict, total[:, 4:T+3] .= sum(charge_dc, dims = 1) rename!(total,auxNew_Names) dfCharge_DC = vcat(dfCharge_DC, total) - CSV.write(joinpath(path,"vre_stor_dc_charge.csv"), dftranspose(dfCharge_DC, false), header=false) + CSV.write(joinpath(path,"vre_stor_dc_charge.csv"), dftranspose(dfCharge_DC, false), writeheader=false) end # AC charging of battery dataframe @@ -323,7 +323,7 @@ function write_vre_stor_charge(path::AbstractString, inputs::Dict, setup::Dict, total[:, 4:T+3] .= sum(charge_ac, dims = 1) rename!(total,auxNew_Names) dfCharge_AC = vcat(dfCharge_AC, total) - CSV.write(joinpath(path,"vre_stor_ac_charge.csv"), dftranspose(dfCharge_AC, false), header=false) + CSV.write(joinpath(path,"vre_stor_ac_charge.csv"), dftranspose(dfCharge_AC, false), writeheader=false) end end @@ -356,7 +356,7 @@ function write_vre_stor_discharge(path::AbstractString, inputs::Dict, setup::Dic total[:, 4:T+3] .= sum(power_vre_stor, dims = 1) rename!(total,auxNew_Names) dfDischarge_DC = vcat(dfDischarge_DC, total) - CSV.write(joinpath(path, "vre_stor_dc_discharge.csv"), dftranspose(dfDischarge_DC, false), header=false) + CSV.write(joinpath(path, "vre_stor_dc_discharge.csv"), dftranspose(dfDischarge_DC, false), writeheader=false) end # AC discharging of battery dataframe @@ -374,7 +374,7 @@ function write_vre_stor_discharge(path::AbstractString, inputs::Dict, setup::Dic total[:, 4:T+3] .= sum(power_vre_stor, dims = 1) rename!(total,auxNew_Names) dfDischarge_AC = vcat(dfDischarge_AC, total) - CSV.write(joinpath(path, "vre_stor_ac_discharge.csv"), dftranspose(dfDischarge_AC, false), header=false) + CSV.write(joinpath(path, "vre_stor_ac_discharge.csv"), dftranspose(dfDischarge_AC, false), writeheader=false) end # Wind generation of co-located resource dataframe @@ -392,7 +392,7 @@ function write_vre_stor_discharge(path::AbstractString, inputs::Dict, setup::Dic total[:, 4:T+3] .= sum(vre_vre_stor, dims = 1) rename!(total,auxNew_Names) dfVP_VRE_STOR = vcat(dfVP_VRE_STOR, total) - CSV.write(joinpath(path,"vre_stor_wind_power.csv"), dftranspose(dfVP_VRE_STOR, false), header=false) + CSV.write(joinpath(path,"vre_stor_wind_power.csv"), dftranspose(dfVP_VRE_STOR, false), writeheader=false) end # Solar generation of co-located resource dataframe @@ -410,6 +410,6 @@ function write_vre_stor_discharge(path::AbstractString, inputs::Dict, setup::Dic total[:, 4:T+3] .= sum(vre_vre_stor, dims = 1) rename!(total,auxNew_Names) dfVP_VRE_STOR = vcat(dfVP_VRE_STOR, total) - CSV.write(joinpath(path,"vre_stor_solar_power.csv"), dftranspose(dfVP_VRE_STOR, false), header=false) + CSV.write(joinpath(path,"vre_stor_solar_power.csv"), dftranspose(dfVP_VRE_STOR, false), writeheader=false) end end