Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2748df4
add initial level setting func
Oct 26, 2025
7e74b47
update tests
Oct 26, 2025
04dc168
add file reading/writing v1-need to fix versioning
Oct 26, 2025
18f10d2
add versioning structure for soc reading
Nov 20, 2025
8b299e0
update tests for prior versioning compat
Nov 24, 2025
e637419
update gitignore for versioned toy test
Nov 24, 2025
79acc0f
add docs for new optional soc
Nov 24, 2025
932b90e
fix indexing bug
Nov 25, 2025
49872ee
fix file test fpath
Nov 25, 2025
3908fb2
fix syntax
Nov 25, 2025
bdae4d0
remove confusing comments
Nov 25, 2025
fd72b4a
update details in systemmodel hdf5
Nov 25, 2025
5a5710b
clarify writing method for 0_8_1
Nov 25, 2025
620ae2d
fix writing demandresponses bug
Nov 25, 2025
b31e96f
fix writing demandresponses bug follow on
Nov 25, 2025
8616d16
fix docstring format
Nov 25, 2025
6e7db0f
round initial values to Ints
juflorez Mar 17, 2026
9f6612c
clarify optional param dtype
juflorez Jul 2, 2026
94806a6
refactor soc init for method sharing
juflorez Jul 2, 2026
cedd317
misc typo fix
juflorez Jul 2, 2026
68901df
misc reorder borrowed_load param
juflorez Jul 2, 2026
1fd2e10
change version testing to 0.9.0
juflorez Jul 2, 2026
bb6fc5a
refactor into per component reading func and load_vector
juflorez Jul 6, 2026
81c751b
simplify read comp versioning
juflorez Jul 6, 2026
57f5aa5
misc comma fix
juflorez Jul 6, 2026
962c9e5
add public docstrings
juflorez Jul 7, 2026
3f52d3e
Revert "add public docstrings"
juflorez Jul 7, 2026
67aea9a
simplify readvector
juflorez Jul 9, 2026
fb8d146
add optional param rountrip test
juflorez Jul 13, 2026
b69eb35
rebase
juflorez Jul 13, 2026
4ffb98a
fix gord email
juflorez Jul 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Manifest.toml
*.DS_Store
*.pras
!PRASFiles.jl/test/versioned_toy/*
PRASFiles.jl/test/PRAS_Results_Export/

docs/build/
Expand Down
8 changes: 4 additions & 4 deletions PRAS.jl/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [
"Julian Florez <Julian.Florez@nlr.gov>",
"Gord Stephen <g.stephen@imperial.ac.uk>"
]
version = "0.8.0"
version = "0.9.0"

[deps]
PRASCapacityCredits = "2e1a2ed5-e89d-4cd3-bc86-c0e88a73d3a3"
Expand All @@ -15,9 +15,9 @@ PRASFiles = "a2806276-6d43-4ef5-91c0-491704cd7cf1"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"

[compat]
PRASCapacityCredits = "0.8.0"
PRASCore = "0.8.0"
PRASFiles = "0.8.0"
PRASCapacityCredits = "0.9.0"
PRASCore = "0.9.0"
PRASFiles = "0.9.0"
Reexport = "1"
julia = "1.10"

Expand Down
4 changes: 2 additions & 2 deletions PRASCapacityCredits.jl/Project.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name = "PRASCapacityCredits"
uuid = "2e1a2ed5-e89d-4cd3-bc86-c0e88a73d3a3"
authors = ["Gord Stephen <g.stephen@imperial.ac.uk>"]
version = "0.8.0"
version = "0.9.0"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
PRASCore = "c5c32b99-e7c3-4530-a685-6f76e19f7fe2"

[compat]
Distributions = "0.25"
PRASCore = "0.7 - 0.8"
PRASCore = "0.7 - 0.9"
julia = "1.10"

[extras]
Expand Down
2 changes: 1 addition & 1 deletion PRASCore.jl/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [
"Julian Florez <Julian.Florez@nlr.gov>",
"Gord Stephen <g.stephen@imperial.ac.uk>"
]
version = "0.8.1"
version = "0.9.0"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
7 changes: 4 additions & 3 deletions PRASCore.jl/src/Simulations/Simulations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,10 @@ function initialize!(
rng, state.lines_available, state.lines_nexttransition,
system.lines, N)

fill!(state.stors_energy, 0)
fill!(state.genstors_energy, 0)
fill!(state.drs_energy, 0)
initialize_energy!(system.storages.initial_soc, state.stors_energy, system.storages.energy_capacity)
initialize_energy!(system.generatorstorages.initial_soc, state.genstors_energy, system.generatorstorages.energy_capacity)
initialize_energy!(system.demandresponses.initial_borrowed_load, state.drs_energy, system.demandresponses.energy_capacity)

fill!(state.drs_unservedenergy, 0)
fill!(state.drs_paybackcounter, -1)
return
Expand Down
16 changes: 16 additions & 0 deletions PRASCore.jl/src/Simulations/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,22 @@ function available_capacity(

end

function initialize_energy!(
initial_values::Vector{Float64},
energy_state::Vector{Int64},
energy_capacity::Matrix{Int64}
)

if size(energy_capacity, 1) > 0
# Set initial state of charge based on initial fraction and initial capacity
energy_state .= round.(Int, initial_values .* energy_capacity[:,1])
else
fill!(energy_state, 0.0)
end

end


function update_energy!(
stors_energy::Vector{Int},
stors::AbstractAssets,
Expand Down
Loading
Loading