|
MATSIM
|
Public Member Functions | |
| TransportModeNetworkFilter (final Network fullNetwork) | |
| void | filter (final Network subNetwork, final Set< String > extractModes) |
Private Attributes | |
| final Network | fullNetwork |
This class extracts a subnetwork from a given network containing only those links where at least one of the given transport modes are allowed. The resulting network will not contain any links where none of the specified transport modes are allowed. In addition, all links in the resulting network will have at most those modes specified for the extraction, additional modes are removed from the allowed set for each link.
This class makes no guarantee that the resulting network is strongly connected, not even when the input network was strongly connected.
Definition at line 50 of file TransportModeNetworkFilter.java.
| org.matsim.core.network.algorithms.TransportModeNetworkFilter.TransportModeNetworkFilter | ( | final Network | fullNetwork | ) |
Definition at line 54 of file TransportModeNetworkFilter.java.
References org.matsim.core.network.algorithms.TransportModeNetworkFilter.fullNetwork.
| void org.matsim.core.network.algorithms.TransportModeNetworkFilter.filter | ( | final Network | subNetwork, |
| final Set< String > | extractModes | ||
| ) |
Extracts a subnetwork containing only links with the specified modes.
I had to extend this method in order to keep the nodes in the same order as in the input network. Otherwise, some router tests failed since for some from-to-pairs, multiple routes with the same costs were found. In that case, the outcome depends on the order of the nodes and links in the network. This problem might occur also in other places, therefore, I fixed it here. cdobler, sep'17
Time-varying networks did not copy time-dependent information. This functionality is included now. sebhoerl, aug'24
| subNetwork | the network object where to store the extracted subnetwork |
| extractModes | set of modes that should be contained in the subnetwork |
Definition at line 74 of file TransportModeNetworkFilter.java.
References org.matsim.api.core.v01.IdSet< T >.add(), org.matsim.api.core.v01.network.Network.addLink(), org.matsim.api.core.v01.network.Network.addNode(), org.matsim.api.core.v01.IdSet< T >.contains(), org.matsim.utils.objectattributes.attributable.AttributesUtils.copyAttributesFromTo(), org.matsim.core.network.turnRestrictions.DisallowedNextLinks.copyOnlyModes(), org.matsim.api.core.v01.network.NetworkFactory.createLink(), org.matsim.api.core.v01.network.NetworkFactory.createNode(), org.matsim.core.network.NetworkUtils.getDisallowedNextLinks(), org.matsim.api.core.v01.network.Network.getFactory(), org.matsim.api.core.v01.network.Network.getLinks(), org.matsim.core.network.TimeDependentNetwork.getNetworkChangeEvents(), org.matsim.api.core.v01.network.Network.getNodes(), org.matsim.core.network.NetworkUtils.getType(), org.matsim.api.core.v01.network.Network.removeNode(), org.matsim.api.core.v01.IdSet< T >.retainAll(), org.matsim.api.core.v01.network.Link.setAllowedModes(), org.matsim.api.core.v01.network.Link.setCapacity(), org.matsim.core.network.NetworkUtils.setDisallowedNextLinks(), org.matsim.api.core.v01.network.Link.setFreespeed(), org.matsim.api.core.v01.network.Link.setLength(), org.matsim.api.core.v01.network.Link.setNumberOfLanes(), and org.matsim.core.network.NetworkUtils.setType().
Referenced by org.matsim.core.router.SingleModeNetworksCache.filterNetwork(), org.matsim.core.router.LinkToLinkRouting.get(), org.matsim.core.population.algorithms.PersonPrepareForSim.PersonPrepareForSim(), org.matsim.core.controler.PrepareForMobsimImpl.run(), and org.matsim.core.controler.PrepareForSimImpl.run().

|
private |
Definition at line 52 of file TransportModeNetworkFilter.java.
Referenced by org.matsim.core.network.algorithms.TransportModeNetworkFilter.TransportModeNetworkFilter().
1.8.13