Describe the feature request
Extend Grid.merge() / merge_grids() to support a merge mode where overlapping assets (by id) are silently skipped, and only assets from the other grid that are absent in the current grid are added.
Current behavior
mode="keep_ids" appends all arrays from the other grid and then calls check_ids(). If any id collision is found, it raises:
ValueError: Asset ids are not unique after merging! Use mode='recalculate_ids' to avoid this.
There is no way to merge two datasets that share a common subset of assets without recalculating IDs.
Requested behavior
Add a new mode, e.g. mode="merge_ids", that for each array in other_grid, only appends rows whose id is not already present in the corresponding array of the current grid.
Motivation / use case
When two grids are built independently but represent overlapping parts of the same network (e.g. a connecting topology shared between scenarios), merging with "recalculate_ids" breaks cross-references, while "keep_ids" fails. The desired semantics is "add what's new, ignore what's already there".
Community Meeting
Describe the feature request
Extend
Grid.merge()/merge_grids()to support a merge mode where overlapping assets (byid) are silently skipped, and only assets from the other grid that are absent in the current grid are added.Current behavior
mode="keep_ids"appends all arrays from the other grid and then callscheck_ids(). If anyidcollision is found, it raises:There is no way to merge two datasets that share a common subset of assets without recalculating IDs.
Requested behavior
Add a new mode, e.g.
mode="merge_ids", that for each array inother_grid, only appends rows whoseidis not already present in the corresponding array of the current grid.Motivation / use case
When two grids are built independently but represent overlapping parts of the same network (e.g. a connecting topology shared between scenarios), merging with
"recalculate_ids"breaks cross-references, while"keep_ids"fails. The desired semantics is "add what's new, ignore what's already there".Community Meeting