PyMacroModelPlugin.MacroExperiment¶
- class MacroExperiment¶
-
Synopsis¶
Methods¶
def
__init__()def
getEngine()def
getOutputData()def
getParameters()def
setEngine()def
setParameters()
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
Detailed Description¶
This class provides the basic variables of a macroexperiment. A Static Assignment Experiment.
A Macro Experiment belongs to one, and only one, Scenario (
MacroScenario).To create a new
MacroExperimentthe following code can be used assuming that target is aMacroScenario:from PyMacroKernelPlugin import * from PyFrankWolfePlugin import * if target != None: cmd = model.createNewCmd( model.getType( "MacroExperiment" )) cmd.setScenario( target ) cmd.setEngine( "FrankWolfe" ) model.getCommander().addCommand( cmd ) experiment = cmd.createdObject() params = experiment.getParameters() params.setMaxIterations ( 50 ) params.setMaxRelativeGap ( 0.001 ) params.setFrankWolfeMethod ( CFrankWolfeParams.eNormal )
- __init__()¶
- createParameters()¶
- Return type:
Creates the experiment parameters. The engine needs to be previously set.
Engine internal name
- getOutputData()¶
- Return type:
Get the created output for the Macro Experiment
- getParameters()¶
- Return type:
The experiment parameters.
- getStatsManager()¶
- Return type:
Get the statistics manager
- setEngine(name)¶
- Parameters:
name – str
Engine internal name. For the Frank&Wolfe engine the name parameter has to be ‘ FrankWolfe ‘.
- setParameters(params)¶
- Parameters:
params –
MacroExperimentParams
Sets the experiment parameters.