Skip to content

Commit

Permalink
Merge pull request #57 from daschw/snapshots
Browse files Browse the repository at this point in the history
Support passing a list of snapshot weights in the top-level YAML
  • Loading branch information
sstroemer authored Jan 31, 2025
2 parents 57b3d60 + 85bcf65 commit 9e48742
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/snapshot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ function _parse_snapshots!(model::JuMP.Model)
weights = _getfromcsv(model, file, column)
elseif config["weights"] isa Number
weights = ones(length(internal(model).model.T)) .* config["weights"]
elseif config["weights"] isa Vector{<:Number}
weights = config["weights"]
end
else
weights = ones(length(internal(model).model.T))
Expand Down

0 comments on commit 9e48742

Please sign in to comment.