PyANGKernel.GKGenericExperiment¶
- class GKGenericExperiment¶
A base class for experiments (Static and Dynamic)
Inherited by:
GKExperimentSynopsis¶
Methods¶
def
__init__()def
addPolicy()def
getDBId()def
getForest()def
getPolicies()def
getScenario()def
getVariables()def
removePolicies()def
removePolicy()def
removeVariable()def
setDBId()def
setForest()def
setVariables()def
unloadForest()def
usesPolicy()
Virtual 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 GKGenericExperimentStatus¶
Status of an execution: - ePending: not yet executed - eDone: executed - eDiscarded: not usable (wrong results maybe) - eLoaded: data in memory (after an execution or after reading data from the database).
For replications or macro results it will be the real status. For experiments it will be the status of the average (or DUE or macro experiment result) status.
- __init__()¶
- addNetworkAttributesOverride(ovrd[, pos=-1])¶
- Parameters:
ovrd –
GKNetworkAttributesOverridepos – int
Adds / inserts a simulation settings object to this experiment in the given position (-1: added to the end)
Add a policy to be use in this experiment.
Is this policy available? It is in the list of available policies in this experiment but maybe the associated strategy is not active in the experiment.
- clearNetworkAttributesOverrides()¶
Removes all simulation settings objects from this experiment.
Returns the experiment id (RID field) in the database. By default is the same as the experiment identifier.
When the execution of this experiment 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 experiment.
- getExecutionStatus()¶
- Return type:
Returns the status of this experiment based on the result on it (Average, DUE…)
The executor use to execute this experiment.
The executor version use to execute this experiment.
- getForest()¶
- Return type:
Gets the contained
NSPForestWhen the execution of this experiment 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 execute this experiment.
- getNetworkAttributesOverrides()¶
- Return type:
.list of GKNetworkAttributesOverride
Returns the simulation settings in this experiment.
Get the path of the first output file
- getOutputPathAssignment()¶
- Return type:
- getOutputPathAssignmentSubset()¶
- Return type:
Returns the policies in this experiment.
Script to execute after the execution of this experiment
Script to execute before the execution of this experiment
- getScenario()¶
- Return type:
Returns the scenario this experiment belongs to
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 experiment and its values.
- removeNetworkAttributesOverride(ovrd)¶
- Parameters:
ovrd –
GKNetworkAttributesOverride
Removes a simulation settings object from this experiment. *
Warning
The specified simulation settings MUST be one of the experiment’s simulation settings.
- removePolicies()¶
Removes all policies from this experiment.
Removes a policy from this experiment.
Removes the variable (first argument) from this experiment. Returns true if the variable was found false otherwise.
Execute the post execution script with this experiment as target.
Execute the pre execution script with this experiment as target. If returns false the execution will be aborted.
- setDBId(aid)¶
- Parameters:
aid – int
Sets the experiment id (RID field) in the database.
When the execution of this experiment 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 experiment.
- setExecutionStatus(status)¶
- Parameters:
status –
GKGenericExperimentStatus
Sets the status of this experiment based on the result on it (Average, DUE…)
- setExecutorName(name)¶
- Parameters:
name – str
The executor use to execute this experiment.
- setExecutorVersion(name)¶
- Parameters:
name – str
The executor version use to execute this experiment.
- setForest(_forest[, _delete=true])¶
- Parameters:
_forest –
BaseForest_delete – bool
Sets the
NSPForestOutput (This pointer is adopted). Used for static assignments. Dynamic assignments will have this information in the replication.When the execution of this experiment 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 execute this experiment.
- setOutputPathAssignment(arg__1)¶
- Parameters:
arg__1 –
GKPathAssignment
- setOutputPathAssignmentSubset(arg__1)¶
- Parameters:
arg__1 –
GKPathAssignment
Script to execute after the execution of this experiment
Script to execute before the execution of this experiment
- setScenario(anScenario)¶
- Parameters:
anScenario –
GKGenericScenario
Sets, at creation time, the scenario for this experiment. It cannot be changed later on.
- setStorePaths(store)¶
- Parameters:
store – bool
- setStorePathsSubset(store)¶
- Parameters:
store – bool
- setValueForVariable(variable, value)¶
- Parameters:
variable – str
value – str
Sets the value (second argument) for a variable (first argument) in this experiment.
- setVariables(newList)¶
- Parameters:
newList – Dictionary with keys of type .QString and values of type QString.
Sets all the variables in this experiment and its values.
- unloadForest()¶
- usesNetworkAttributesOverride(ovrd)¶
- Parameters:
ovrd –
GKNetworkAttributesOverride- Return type:
Returns the position of the given simulation settings object inside the experiment list, or -1 if not used.
Returns true is the policy is used in the experiment.