PyANGKernel.GKReplication¶
- class GKReplication¶
A replication used by the Aimsun Next Simulator.
Details
They are the result of a single simulation and they can be grouped in experiment averages (
GKExperimentResult).Inherited by:
GKExperimentResultSynopsis¶
Methods¶
def
__init__()def
getDBId()def
getExperiment()def
getPathsForest()def
getRandomSeed()def
getRefreshRate()def
getStorePaths()def
setDBId()def
setExperiment()def
setPathsForest()def
setRandomSeed()def
setRefreshRate()def
setStorePaths()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- class GKSimulationMode¶
Aimsun Next Simulator modes: - eInteractive: Starts an animated simulation. The simulation stops after simulating the warm-up period and waits for the user to continue it. - eInteractiveAutoPlay: Starts an animated simulation and continues to play it after running the warm-up period. - eBatch: Simulates a replication in batch. The user can only cancel the replication while it is running or can wait until it ends. - eBatchIterative: Batch mode using an iterative process to get equilibrium. - eBatchExternal: Simulates a replication in batch controlled by a external process (ex: HybridSimulator). The user can only cancel the replication while it is running or can wait until it ends. - eInteractiveExternal: Simulates a replication in Animated mode controlled by a external process.
- __init__()¶
- enablePTVehiclesInBatch()¶
When running in batch mode GKSimVehicle objects are not created by default (to simulate faster). This call enables the creation for transit vehicles in batch mode.
- enableVehiclesInBatch(value)¶
- Parameters:
value – bool
When running in batch mode GKSimVehicle objects are not created by default (to simulate faster). This call enables the creation in batch mode. Useful when creating attributes on these vehicles.
Returns the replication ID (RID field) in the database. By default is the same as the replication identifier.
When this simulation ends. Note that this is the real time and not a simulated time. Use the init and the end time to know the required time to simulate this replication.
- getExperiment()¶
- Return type:
Returns the experiment where this replication is.
returns whether the replication will generate a dynamic traversal
When this simulation was started. Note that this is the real time and not a simulated time. Use the init and the end time to know the required time to simulate this replication.
- getOutputPathAssignment()¶
- Return type:
- getOutputTrafficArrivals()¶
- Return type:
- getPathsForest()¶
- Return type:
Returns the current Forest if restored or simulated previously
Gets the random seed. A seed is set when creating the object.
Gets if the simulation is going to be recorded
Gets the refresh rate of the record simulation in Meso
Returns whether an initial state will be stored at the end of the simulation
- getSavedInitialState()¶
- Return type:
If
getSaveInitialState()is true, returns the initial state to be stored or already stored at the end of the simulation. It return NULL otherwise- getSimulationStatus()¶
- Return type:
Gets the replication status. See GKReplicationSimulationStatus
The simulator use to simulate this replication.
The simulator version use to simulate this replication.
returns whether the replication will provide OD Routes with the dynamic traversal
- getTraversalSubnet()¶
- Return type:
returns the dynamic traversal subnetwork
When restoring a replication data from a database: if true use the external ID of the objects to map the data to the current objects. If false (the default) it uses the identifier.
returns whether the simulation should explicitly only create GKSimVehicle instances for transit vehicles.
When running in batch mode GKSimVehicle objects are not created by default (to simulate faster). This call enables the creation in batch mode. Useful when creating attributes on these vehicles.
- resetVehiclesInBatch()¶
Turn off creation of GKSimVehicle instances in batch runs.
- restorePathsForest()¶
restores the paths from the current APA file
- setDBId(aid)¶
- Parameters:
aid – int
Sets the replication ID (RID field) in the database.
When this simulation ends. Note that this is the real time and not a simulated time. Use the init and the end time to know the required time to simulate this replication.
- setExperiment(aexperiment)¶
- Parameters:
aexperiment –
GKExperiment
Sets the experiment where this replication is.
- setGenerateTraversal(value)¶
- Parameters:
value – bool
sets whether the replication will generate a dynamic traversal
When this simulation was started. Note that this is the real time and not a simulated time. Use the init and the end time to know the required time to simulate this replication.
- setOutputPathAssignment(aPathAssignment)¶
- Parameters:
aPathAssignment –
GKPathAssignment
- setOutputTrafficArrivals(aTrafficArrivals)¶
- Parameters:
aTrafficArrivals –
GKTrafficArrivals
- setPathsForest(forest)¶
- Parameters:
forest –
BaseForest
Sets the Forest to be used during the simulation
- setRandomSeed(aseed)¶
- Parameters:
aseed – int
Sets the random seed. A seed is set when creating the object.
- setRecordSimulation(aRecordSimulation)¶
- Parameters:
aRecordSimulation – bool
Sets if the simulation is going to be recorded
- setRefreshRate(aRefreshRate)¶
- Parameters:
aRefreshRate – int
Sets the refresh rate of the record simulation in Meso
- setSaveInitialState(value)¶
- Parameters:
value – bool
Sets whether an initial state needs to be stored at the end of the simulation
- setSavedInitialState(iniState)¶
- Parameters:
iniState –
GKDynamicTrafficSnapshot
If
getSaveInitialState()is true, sets the initial state to be stored at the end of the simulation.- setSimulationStatus(astatus)¶
- Parameters:
astatus –
GKGenericExperimentStatus
Sets the replication status. See GKReplicationSimulationStatus
- setSimulatorName(name)¶
- Parameters:
name – str
The simulator use to simulate this replication.
- setSimulatorVersion(name)¶
- Parameters:
name – str
The simulator version use to simulate this replication.
- setStorePaths(storePaths)¶
- Parameters:
storePaths – bool
- setStoreTrafficArrivals(storeTrafficArrivals)¶
- Parameters:
storeTrafficArrivals – bool
- setTraversalRoutes(value)¶
- Parameters:
value – bool
sets whether the replication will provide OD Routes with the dynamic traversal
- setTraversalSubnet(subnet)¶
- Parameters:
subnet –
GKProblemNet
sets the subnetwork where the dynamic traversal will be generated.
- setUseExternalId(value)¶
- Parameters:
value – bool
When restoring a replication data from a database: if true use the external ID of the objects to map the data to the current objects. If false (the default) it uses the identifier.
- unloadPathsForest()¶
Deletes the paths from memory