csdms

Experiment class

A Python interface to a Dakota input file.

class dakotathon.experiment.Experiment(component=None, plugin=None, environment='environment', method='vector_parameter_study', variables='continuous_design', interface='direct', responses='response_functions', **kwargs)[source]

Bases: object

An aggregate of control blocks that define a Dakota input file.

__init__(component=None, plugin=None, environment='environment', method='vector_parameter_study', variables='continuous_design', interface='direct', responses='response_functions', **kwargs)[source]

Create the set of control blocks for a Dakota experiment.

Called with no parameters, a Dakota experiment with basic defaults (a vector parameter study with the built-in rosenbrock example) is created.

component : str, optional
Name of CSDMS component which Dakota is analyzing (default is None). The component and plugin parameters are exclusive.
plugin : str, optional
Name of a plugin model which Dakota is analyzing (default is None). The component and plugin parameters are exclusive.
environment : str, optional
Type of environment used in Dakota experiment (default is ‘environment’).
method : str, optional
Type of method used in Dakota experiment (default is ‘vector_parameter_study’).
variables : str, optional
Type of variables used in Dakota experiment (default is ‘continuous_design’).
interface : str, optional
Type of interface used in Dakota experiment (default is ‘direct’).
responses : str, optional
Type of responses used in Dakota experiment (default is ‘response_functions’).
**kwargs
Arbitrary keyword arguments.

Create a generic Dakota experiment:

>>> x = Experiment()

Create a vector parameter study experiment:

>>> x = Experiment(method='vector_parameter_study')
__str__()[source]

The contents of the Dakota input file represented as a string.

Print the Dakota input file to the console.

>>> x = Experiment()
>>> print(x)
# Dakota input file
environment
  tabular_data
    tabular_data_file = 'dakota.dat'
<BLANKLINE>
method
  vector_parameter_study
    final_point = 1.1 1.3
    num_steps = 10
<BLANKLINE>
variables
  continuous_design = 2
    descriptors = 'x1' 'x2'
    initial_point = -0.3 0.2
<BLANKLINE>
interface
  id_interface = 'CSDMS'
  direct
  analysis_driver = 'rosenbrock'
<BLANKLINE>
responses
  response_functions = 1
    response_descriptors = 'y1'
  no_gradients
  no_hessians
<BLANKLINE>
blocks = ('environment', 'method', 'variables', 'interface', 'responses')

The named control blocks of a Dakota input file.

environment

The environment control block.

interface

The interface control block.

method

The method control block.

responses

The responses control block.

variables

The variables control block.