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 ).

Inheritance diagram of PyANGKernel.GKReplication

Inherited by: GKExperimentResult

Synopsis

Methods

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.

getDBId()
Return type:

int

Returns the replication ID (RID field) in the database. By default is the same as the replication identifier.

getDefaultTripsFilePath()
Return type:

str

getEndSimulationTime()
Return type:

QDateTime

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:

GKExperiment

Returns the experiment where this replication is.

getGenerateTraversal()
Return type:

bool

returns whether the replication will generate a dynamic traversal

getInitSimulationTime()
Return type:

QDateTime

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:

GKPathAssignment

getOutputTrafficArrivals()
Return type:

GKTrafficArrivals

getPathsForest()
Return type:

BaseForest

Returns the current Forest if restored or simulated previously

getRandomSeed()
Return type:

int

Gets the random seed. A seed is set when creating the object.

getRecordSimulation()
Return type:

bool

Gets if the simulation is going to be recorded

getRefreshRate()
Return type:

int

Gets the refresh rate of the record simulation in Meso

getSaveInitialState()
Return type:

bool

Returns whether an initial state will be stored at the end of the simulation

getSavedInitialState()
Return type:

GKDynamicTrafficSnapshot

If getSaveInitialState() is true, returns the initial state to be stored or already stored at the end of the simulation. It return NULL otherwise

getSavedInitialstateDateTime()
Return type:

QDateTime

getSimulationStatus()
Return type:

GKGenericExperimentStatus

Gets the replication status. See GKReplicationSimulationStatus

getSimulatorName()
Return type:

str

The simulator use to simulate this replication.

getSimulatorVersion()
Return type:

str

The simulator version use to simulate this replication.

getStorePaths()
Return type:

bool

getStoreTrafficArrivals()
Return type:

bool

getTraversalRoutes()
Return type:

bool

returns whether the replication will provide OD Routes with the dynamic traversal

getTraversalSubnet()
Return type:

GKProblemNet

returns the dynamic traversal subnetwork

getUseExternalId()
Return type:

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.

isEnabledPTVehiclesInBatch()
Return type:

bool

returns whether the simulation should explicitly only create GKSimVehicle instances for transit vehicles.

isEnabledVehiclesInBatch()
Return type:

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.

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.

setEndSimulationTime(time)
Parameters:

timeQDateTime

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:

aexperimentGKExperiment

Sets the experiment where this replication is.

setGenerateTraversal(value)
Parameters:

value – bool

sets whether the replication will generate a dynamic traversal

setInitSimulationTime(time)
Parameters:

timeQDateTime

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:

aPathAssignmentGKPathAssignment

setOutputTrafficArrivals(aTrafficArrivals)
Parameters:

aTrafficArrivalsGKTrafficArrivals

setPathsForest(forest)
Parameters:

forestBaseForest

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:

iniStateGKDynamicTrafficSnapshot

If getSaveInitialState() is true, sets the initial state to be stored at the end of the simulation.

setSavedInitialStateDateTime(aDateTime)
Parameters:

aDateTimeQDateTime

setSimulationStatus(astatus)
Parameters:

astatusGKGenericExperimentStatus

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:

subnetGKProblemNet

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