decision_optimization_client.Experiment

class decision_optimization_client.Experiment
name

Name of the experiment

description

Description of the experiment

create_container(category=None, **kwargs)

Creates a Container whose parent is this Experiment.

Currently supported categories are:

  • 'scenario'

Example

This creates an scenario Container with the name ‘foo’:

>>> c = experiment.create_container(category='scenario', name='foo')
Parameters
  • category – The category of the container.

  • **kwargs – kwargs passed to the Container constructor. For example, you can pass params such as name etc..

Returns

The created Container

create_scenario(name, **kwargs)

Creates a new Container attached as a scenario of this Experiment.

Parameters
  • name – The name of the container.

  • **kwargs – kwargs passed to the Container constructor.

Returns

The scenario as a Container

Return type

Container

Raises

NotBoundException – when the Artifact is not bound to a client.

delete_container(container)

Deletes the specified Container

Parameters

container – The Container to be deleted.

get_containers(category=None, as_dict=False)

Returns containers of the specified category in this Experiment.

Parameters
  • category – The category of Container. Can be 'scenario' or 'dashboard'.

  • as_dict – If True, the containers are returned as a dict where its keys are the container names and its values are containers.

Returns

A list of Container or a dict mapping container names to Container

get_scenario(name)

Returns the scenario for the specified name.

Parameters

name – The name of the scenario.

Returns

The scenario as a

Container

Return type

Container

get_scenarios(as_dict=False)

Returns scenarios of this Experiment.

Parameters

as_dict – If True, the containers are returned as a dict which keys are container names and which values are containers.

Returns

A list of Container or a dict mapping container names to Container