PyANGKernel.GKGenericExperiment

class GKGenericExperiment

A base class for experiments (Static and Dynamic)

Inheritance diagram of PyANGKernel.GKGenericExperiment

Inherited by: GKExperiment

Synopsis

Methods

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:

Adds / inserts a simulation settings object to this experiment in the given position (-1: added to the end)

addPolicy(policy)
Parameters:

policyGKPolicy

Add a policy to be use in this experiment.

canPolicyBeUsed(policy)
Parameters:

policyGKPolicy

Return type:

bool

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.

getDBId()
Return type:

int

Returns the experiment id (RID field) in the database. By default is the same as the experiment identifier.

getEndExecutionTime()
Return type:

QDateTime

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:

GKGenericExperimentStatus

Returns the status of this experiment based on the result on it (Average, DUE…)

getExecutorName()
Return type:

str

The executor use to execute this experiment.

getExecutorVersion()
Return type:

str

The executor version use to execute this experiment.

getForest()
Return type:

BaseForest

Gets the contained NSPForest

getInitExecutionTime()
Return type:

QDateTime

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.

getNetworkAttributesOverrides()
Return type:

.list of GKNetworkAttributesOverride

Returns the simulation settings in this experiment.

getOutputFile(iType)
Parameters:

iType – str

Return type:

str

Get the path of the first output file

getOutputPathAssignment()
Return type:

GKPathAssignment

getOutputPathAssignmentSubset()
Return type:

GKPathAssignment

getPolicies()
Return type:

.list of GKPolicy

Returns the policies in this experiment.

getPostExecutionScript()
Return type:

GKScript

Script to execute after the execution of this experiment

getPreExecutionScript()
Return type:

GKScript

Script to execute before the execution of this experiment

getScenario()
Return type:

GKGenericScenario

Returns the scenario this experiment belongs to

getValueForVariable(variable)
Parameters:

variable – str

Return type:

str

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.

isLicenseValid()
Return type:

bool

removeNetworkAttributesOverride(ovrd)
Parameters:

ovrdGKNetworkAttributesOverride

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.

removePolicy(policy)
Parameters:

policyGKPolicy

Removes a policy from this experiment.

removeVariable(variable)
Parameters:

variable – str

Return type:

bool

Removes the variable (first argument) from this experiment. Returns true if the variable was found false otherwise.

runPostExecutionScript()
Return type:

bool

Execute the post execution script with this experiment as target.

runPreExecutionScript()
Return type:

bool

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.

setEndExecutionTime(time)
Parameters:

timeQDateTime

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:

statusGKGenericExperimentStatus

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:

Sets the NSPForest Output (This pointer is adopted). Used for static assignments. Dynamic assignments will have this information in the replication.

setInitExecutionTime(time)
Parameters:

timeQDateTime

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__1GKPathAssignment

setOutputPathAssignmentSubset(arg__1)
Parameters:

arg__1GKPathAssignment

setPostExecutionScript(script)
Parameters:

scriptGKScript

Script to execute after the execution of this experiment

setPreExecutionScript(script)
Parameters:

scriptGKScript

Script to execute before the execution of this experiment

setScenario(anScenario)
Parameters:

anScenarioGKGenericScenario

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:

ovrdGKNetworkAttributesOverride

Return type:

int

Returns the position of the given simulation settings object inside the experiment list, or -1 if not used.

usesPolicy(policy)
Parameters:

policyGKPolicy

Return type:

bool

Returns true is the policy is used in the experiment.