You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionmerge(self, other, subnetwork_id_shift) ->Int:
node_id_shift=max(self.node.df.node_id)
# merge node table chunks using the node_id and subnetwork_id shifts
...
# merge other tables using the node_id shift
...
returnnode_id_shift
Now the edge tables can be merged using the node ID shifts from all different node types. What to do with the edge ID?
Special care has to be taken with tables from node types which refer to nodes from other types (i.e. control node types), in which the node ID shifts also have to be applied.
The text was updated successfully, but these errors were encountered:
A few moons ago I made an attempt at supporting merging models in Ribasim Python, which was never merged:
Issue: #912
PR: #914
A few things have changed in Ribasim Python since then, most notably:
New merge method structure
I propose the following structure for a method
model.merge(other)
:subnetwork_id
inmodel
:where
self.max_subnetwork_id
is a method which loops over the now distributed chunks of the node table to find the maximum subnetwork ID;node_type = basin
) and call a merge method on the level ofNodeModel
(?):This merge method looks something like this:
The text was updated successfully, but these errors were encountered: