Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modeler allocation input #699

Merged
merged 16 commits into from
Oct 30, 2023
Merged

Modeler allocation input #699

merged 16 commits into from
Oct 30, 2023

Conversation

SouthEndMusic
Copy link
Collaborator

Fixes #656.

@SouthEndMusic SouthEndMusic marked this pull request as draft October 25, 2023 09:31
@SouthEndMusic
Copy link
Collaborator Author

SouthEndMusic commented Oct 25, 2023

For some reason I now get an SQLiteException("out of memory"), M'W'E:

using Ribasim
using SQLite

toml_path = "path/to/generated_testmodels/subnetwork/ribasim.toml"
cfg = Ribasim.Config(toml_path)
gpkg_path = Ribasim.input_path(cfg, cfg.database)
db = SQLite.DB(gpkg_path)
p = Ribasim.Parameters(db, cfg)
close(db)

Ribasim.generate_allocation_models!(p, db, cfg)

Edit: this is due to the database being closed before reading from it. The error message wasn't informative though, so @evetion fixed it: JuliaDatabases/SQLite.jl#337.

@SouthEndMusic
Copy link
Collaborator Author

@Reviewer: I suggest adding more tests after #659.

@SouthEndMusic SouthEndMusic marked this pull request as ready for review October 27, 2023 10:26
Copy link
Member

@visr visr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Left a few comments.

core/src/Ribasim.jl Outdated Show resolved Hide resolved
core/src/allocation.jl Outdated Show resolved Hide resolved
core/src/bmi.jl Outdated Show resolved Hide resolved
core/src/bmi.jl Outdated Show resolved Hide resolved
core/src/bmi.jl Outdated Show resolved Hide resolved
@SouthEndMusic SouthEndMusic merged commit c3c69a9 into main Oct 30, 2023
9 checks passed
@SouthEndMusic SouthEndMusic deleted the allocation_input branch October 30, 2023 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modeller input for allocation
2 participants