PyANGKernel.GKGenericScenario¶
- class GKGenericScenario¶
A base class for scenarios (Static and Dynamic)
Inherited by:
GKScenarioSynopsis¶
Methods¶
def
__init__()def
addExperiment()def
addStrategy()def
getDBOptions()def
getDate()def
getDemand()def
getExperiments()def
getProblemNet()def
getRealDataSet()def
getTemperature()def
getVariables()def
removeStrategy()def
setDBOptions()def
setDate()def
setDemand()def
setProblemNet()def
setRealDataSet()def
setTemperature()def
setVariables()
Virtual methods¶
def
canRunRemotely()def
getDuration()def
getInitialTime()def
savesAnyData()
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
- __init__()¶
- addExperiment(experiment)¶
- Parameters:
experiment –
GKGenericExperiment
Adds an experiment to this scenario
- addGeometryConfiguration(configuration)¶
- Parameters:
configuration –
GKGeometryConfiguration
Adds the configuration to this scenario
- addStrategy(strategy)¶
- Parameters:
strategy –
GKStrategy
Adds a strategy to this scenario. Policies are not activated yet (they can be at the experiment)
- addTrafficCondition(condition)¶
- Parameters:
condition –
GKSimulationEvent
Adds a traffic condition to the scenario.
Returns true if this scenario can be executed using a remote executor.
- getDBOptions()¶
- Return type:
It returns the database information associated with this scenario. If returnProjectDB is true and the DB uses refers to the Project (
useProjectDB) it will return the project DB (getProjectDatabase), if false or it don’t use the Project DB it will return the DB in this scenario.Returns the simulation data. Used to document a scenario. It do not have any effect in the simulation results.
- getDemand()¶
- Return type:
Returns the traffic demand that will be used. If it is NULL no simulation will be possible.
- getDuration()¶
- Return type:
Gets all the experiments belonging to this scenario
- getGeometryConfigurations()¶
- Return type:
.list of const GKGeometryConfiguration
Returns the geometry configurations used in this scenario
- getInputPathAssignmentPlan()¶
- Return type:
Returns the path assignment plan object used as input
- getMasterControlPlan()¶
- Return type:
Returns the master control plans. It can be NULL (no control plans will be used but an external control plan via Aimsun extensions can still be used).
- getProblemNet()¶
- Return type:
Is this scenario in a subnetwork?. A scenario can be either a global one (at model level) or inside a subnetwork (but not both).
- getPublicLinePlan()¶
- Return type:
Returns the transit plans. It can be NULL (no transit)
- getRealDataSet()¶
- Return type:
A real data set associated with the scenario and used to validate it.
All the strategies and traffic conditions.
Get environment Temperature (Celsius degrees). Used by Battery consumption model
helper function: list all the available traffic demand items, either from the project or from the subnetwork
Returns the value of a variable. If the variable is not defined it will return QString().
If the variable is not really a variable then it will be returned as is.
- getVariables()¶
- Return type:
Dictionary with keys of type .QString and values of type QString.
Returns all the variables in this scenario and its values.
- hasSameGeometryConfigurations(otherSce)¶
- Parameters:
otherSce –
GKGenericScenario- Return type:
Returns true if this scenario and the one gives as parameter have the same geometry configurations active.
- removeAllStrategiesAndConditions()¶
Removes all the strategies and traffic conditions from this scenario. The objects is not deleted.
- removeExperiment(experiment)¶
- Parameters:
experiment –
GKGenericExperiment
Removes the experiment ‘experiment’ from this scenario
- removeGeometryConfiguration(configuration)¶
- Parameters:
configuration –
GKGeometryConfiguration
Removes the configuration to this scenario
- removeStrategy(strategy)¶
- Parameters:
strategy –
GKStrategy
Removes a strategy from this scenario. The object is not deleted. *
Warning
The specified strategy MUST be one of the scenario’s strategies.
- removeTrafficCondition(condition)¶
- Parameters:
condition –
GKSimulationEvent
Removes a traffic condition from this scenario. The object is not deleted. *
Warning
The specified traffic condition MUST be one of the scenario’s traffic conditions.
Returns true if this scenario will save any data after execution. If false running it using a remote executor will produce nothing.
- setDBOptions(db)¶
- Parameters:
db –
GKDataBaseInfo
It sets the database information associated with this scenario.
Sets the simulation data. Used to document a scenario. It do not have any effect in the simulation results.
- setDemand(ademand)¶
- Parameters:
ademand –
GKTrafficDemand
Sets the traffic demand that will be used. If is NULL no simulation will be possible.
- setGeometryConfigurations(value)¶
- Parameters:
value – .list of const GKGeometryConfiguration
Sets the geometry configurations used in this scenario
- setInputPathAssignmentPlan(arg__1)¶
- Parameters:
arg__1 –
GKPathAssignmentPlan
Sets the path assignment plan object used as input
- setMasterControlPlan(amasterCP)¶
- Parameters:
amasterCP –
GKMasterControlPlan
Sets the master control plans. It can be NULL (no control plans will be used but an external control plan via Aimsun extensions can still be used).
- setProblemNet(apn)¶
- Parameters:
apn –
GKProblemNet
Set this scenario in a subnetwork. A scenario can be either a global one (at model level) or inside a subnetwork (but not both).
- setPublicLinePlan(aplan)¶
- Parameters:
aplan –
GKPublicLinePlan
Sets the transit plans. It can be NULL (no transit)
- setRealDataSet(dataSet)¶
- Parameters:
dataSet –
GKRealDataSet
A real data set associated with the scenario and used to validate it.
- setTemperature(aTemperature)¶
- Parameters:
aTemperature – float
Set environment Temperature (Celsius degrees). Used by Battery consumption model
- setValueForVariable(variable, value)¶
- Parameters:
variable – str
value – str
Sets the value (second argument) for a variable (first argument) in this scenario.
- setVariables(newList)¶
- Parameters:
newList – Dictionary with keys of type .QString and values of type QString.
Sets all the variables in this scenario and its values.
- usesGeometryConfiguration(configuration)¶
- Parameters:
configuration –
GKGeometryConfiguration- Return type:
Returns true if the configuration is used in this scenario
- usesStrategyOrCondition(strategyOrCondition)¶
Returns true if the strategy or traffic condition is used in this scenario.