Package org.opentrafficsim.road.network
Class OTSRoadNetworkUtils
java.lang.Object
org.opentrafficsim.road.network.OTSRoadNetworkUtils
public final class OTSRoadNetworkUtils
extends java.lang.Object
OTSRoadNetworkCloner makes a deep clone of a network.
Copyright (c) 2003-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.
Copyright (c) 2003-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.
- Author:
- Alexander Verbraeck
-
Method Summary
Modifier and Type Method Description static OTSRoadNetwork
clone(OTSRoadNetwork network, java.lang.String newId, SimulatorInterface.TimeDoubleUnit oldSimulator, OTSSimulatorInterface newSimulator)
Clone the OTSRoadNetwork.static void
destroy(OTSRoadNetwork network, SimulatorInterface.TimeDoubleUnit simulator)
Remove all objects and animation in the road network.
-
Method Details
-
clone
public static OTSRoadNetwork clone(OTSRoadNetwork network, java.lang.String newId, SimulatorInterface.TimeDoubleUnit oldSimulator, OTSSimulatorInterface newSimulator) throws NetworkExceptionClone the OTSRoadNetwork.- Parameters:
network
- OTSRoadNetwork; the network to clonenewId
- String; the new id of the networkoldSimulator
- SimulatorInterface.TimeDoubleUnit; the old simulator for this networknewSimulator
- OTSSimulatorInterface; the new simulator for this network- Returns:
- a clone of this network
- Throws:
NetworkException
- in case the cloning fails
-
destroy
Remove all objects and animation in the road network.- Parameters:
network
- OTSRoadNetwork; the network to destroysimulator
- SimulatorInterface.TimeDoubleUnit; the simulator of the old network
-