csdms

Dakota class

A Python interface to the Dakota iterative systems analysis toolkit.

class dakotathon.dakota.Dakota(run_directory='/home/docs/checkouts/readthedocs.org/user_builds/csdms-dakota/checkouts/latest/docs/source', configuration_file='dakota.yaml', input_file='dakota.in', output_file='dakota.out', run_log='run.log', error_log='stderr.log', template_file=None, auxiliary_files=(), **kwargs)[source]

Bases: dakotathon.experiment.Experiment

Controller for configuring and running a Dakota experiment.

__init__(run_directory='/home/docs/checkouts/readthedocs.org/user_builds/csdms-dakota/checkouts/latest/docs/source', configuration_file='dakota.yaml', input_file='dakota.in', output_file='dakota.out', run_log='run.log', error_log='stderr.log', template_file=None, auxiliary_files=(), **kwargs)[source]

Initialize 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. Use method to set the Dakota analysis method in a new experiment.

run_directory : str, optional
The working directory in which Dakota is run, and output is placed (default is the current directory).
configuration_file : str, optional
A Dakota instance serialized to a YAML file (default is dakota.yaml).
input_file : str, optional
Name of Dakota input file (default is dakota.in).
output_file : str, optional
Name of Dakota output file (default is dakota.out).
run_log : str, optional
Name of Dakota log file (default is run.log*)
error_log : str, optional
Name of Dakota error log file (default is stderr.log*)
template_file : str, optional
The Dakota template file, formed from the input file of the model to study, but with study variables replaced by descriptors in braces; e.g., {total_annual_precipitation} (default is None).
auxiliary_files : str or tuple or list of str, optional
Additional input files used by the model being studied.
**kwargs
Arbitrary keyword arguments.

Create a generic Dakota experiment:

>>> d = Dakota()

Create a vector parameter study experiment:

>>> d = Dakota(method='vector_parameter_study')
auxiliary_files

Auxiliary files used by the component.

configuration_file

The configuration file path.

classmethod from_file_like(file_like)[source]

Create a Dakota instance from a file-like object.

file_like : file_like
A configuration file or file-like object.
Dakota
A new Dakota instance.
run()[source]

Run the Dakota experiment.

Run is executed in the directory specified by run_directory keyword and run log and error log are created.

run_directory

The run directory path.

serialize(config_file=None)[source]

Dump settings for experiment to a YAML configuration file.

config_file : str, optional
A path/name for a new configuration file.

Make a configuration file for a vector parameter study experiment:

>>> d = Dakota(method='vector_parameter_study')
>>> d.serialize('dakota.yaml')
setup()[source]

Write the Dakota configuration and input files.

As a convenience, make a configuration file and an input file for an experiment in one step:

>>> d = Dakota(method='vector_parameter_study')
>>> d.setup()
template_file

The template file path.

write_input_file(input_file=None)[source]

Create the Dakota input file for the experiment.

The input file is written to the directory specified by the run_directory attribute.

input_file : str, optional
A path/name for a new Dakota input file.

Make an input file for a vector parameter study experiment:

>>> d = Dakota(method='vector_parameter_study')
>>> d.write_input_file('dakota.in')