PyMacroModelPlugin.MacroExperiment

class MacroExperiment

Inheritance diagram of PyMacroModelPlugin.MacroExperiment

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

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 MacroExperiment the following code can be used assuming that target is a MacroScenario :

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:

MacroExperimentParams

Creates the experiment parameters. The engine needs to be previously set.

getEngine()
Return type:

str

Engine internal name

getOutputData()
Return type:

MacroExperimentOutputData

Get the created output for the Macro Experiment

getParameters()
Return type:

MacroExperimentParams

The experiment parameters.

getStatsManager()
Return type:

CMacroStatsManager

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:

paramsMacroExperimentParams

Sets the experiment parameters.