ConfigDict

(class from pyomo.common.config)

class pyomo.common.config.ConfigDict(description=None, doc=None, implicit=False, implicit_domain=None, visibility=0)[source]

Bases: ConfigBase, Mapping

Store and manipulate a dictionary of configuration values.

Parameters:
  • description (str, optional) – The short description of this list

  • doc (str, optional) – The long documentation string for this list

  • implicit (bool, optional) – If True, the ConfigDict will allow “implicitly” declared keys, that is, keys can be stored into the ConfigDict that were not previously declared using declare() or declare_from().

  • implicit_domain (Callable, optional) – The domain that will be used for any implicitly-declared keys. Follows the same rules as ConfigValue()’s domain.

  • visibility (int, optional) – The visibility of this ConfigDict when generating templates and documentation. Visibility supports specification of “advanced” or “developer” options. ConfigDicts with visibility=0 (the default) will always be printed / included. ConfigDicts with higher visibility values will only be included when the generation method specifies a visibility greater than or equal to the visibility of this object.

__init__(description=None, doc=None, implicit=False, implicit_domain=None, visibility=0)[source]

Methods

__init__([description, doc, implicit, ...])

add(name, config)

declare(name, config)

declare_as_argument(*args, **kwds)

Map this Config item to an argparse argument.

declare_from(other[, skip])

display([content_filter, indent_spacing, ...])

domain_name()

generate_documentation([block_start, ...])

generate_yaml_template([indent_spacing, ...])

get(k[,d])

import_argparse(parsed_args)

initialize_argparse(parser)

items()

iteritems()

DEPRECATED.

iterkeys()

DEPRECATED.

itervalues()

DEPRECATED.

keys()

name([fully_qualified])

reset()

set_default_value(default)

set_domain(domain)

set_value(value[, skip_implicit])

setdefault(key[, default])

unused_user_values()

user_values()

value([accessValue])

values()

Attributes

content_filters

Member Documentation

declare_as_argument(*args, **kwds)

Map this Config item to an argparse argument.

Valid arguments include all valid arguments to argparse’s ArgumentParser.add_argument() with the exception of ‘default’. In addition, you may provide a group keyword argument to either pass in a pre-defined option group or subparser, or else pass in the string name of a group, subparser, or (subparser, group).

get(k[, d]) D[k] if k in D, else d.  d defaults to None.[source]
items() a set-like object providing a view on D's items[source]
iteritems()[source]

DEPRECATED.

Deprecated since version 6.0: The iteritems method is deprecated. Use dict.keys().

iterkeys()[source]

DEPRECATED.

Deprecated since version 6.0: The iterkeys method is deprecated. Use dict.keys().

itervalues()[source]

DEPRECATED.

Deprecated since version 6.0: The itervalues method is deprecated. Use dict.keys().

keys() a set-like object providing a view on D's keys[source]
values() an object providing a view on D's values[source]