AutoUpdateConfig

(class from pyomo.contrib.solver.common.config)

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

Bases: ConfigDict

Control which parts of the model are automatically checked and/or updated upon re-solve

Options:
  • check_for_new_or_removed_constraints (bool, default=True) – If False, new/old constraints will not be automatically detected on subsequent solves. Use False only when manually updating the solver with opt.add_constraints() and opt.remove_constraints() or when you are certain constraints are not being added to/removed from the model.

  • check_for_new_or_removed_vars (bool, default=True) – If False, new/old variables will not be automatically detected on subsequent solves. Use False only when manually updating the solver with opt.add_variables() and opt.remove_variables() or when you are certain variables are not being added to / removed from the model.

  • check_for_new_or_removed_params (bool, default=True) – If False, new/old parameters will not be automatically detected on subsequent solves. Use False only when manually updating the solver with opt.add_parameters() and opt.remove_parameters() or when you are certain parameters are not being added to / removed from the model.

  • check_for_new_objective (bool, default=True) – If False, new/old objectives will not be automatically detected on subsequent solves. Use False only when manually updating the solver with opt.set_objective() or when you are certain objectives are not being added to / removed from the model.

  • update_constraints (bool, default=True) – If False, changes to existing constraints will not be automatically detected on subsequent solves. This includes changes to the lower, body, and upper attributes of constraints. Use False only when manually updating the solver with opt.remove_constraints() and opt.add_constraints() or when you are certain constraints are not being modified.

  • update_vars (bool, default=True) – If False, changes to existing variables will not be automatically detected on subsequent solves. This includes changes to the lb, ub, domain, and fixed attributes of variables. Use False only when manually updating the solver with opt.update_variables() or when you are certain variables are not being modified.

  • update_parameters (bool, default=True) – If False, changes to parameter values will not be automatically detected on subsequent solves. Use False only when manually updating the solver with opt.update_parameters() or when you are certain parameters are not being modified.

  • update_named_expressions (bool, default=True) – If False, changes to Expressions will not be automatically detected on subsequent solves. Use False only when manually updating the solver with opt.remove_constraints() and opt.add_constraints() or when you are certain Expressions are not being modified.

  • update_objective (bool, default=True) – If False, changes to objectives will not be automatically detected on subsequent solves. This includes the expr and sense attributes of objectives. Use False only when manually updating the solver with opt.set_objective() or when you are certain objectives are not being modified.

__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.
items() a set-like object providing a view on D's items
iteritems()

DEPRECATED.

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

iterkeys()

DEPRECATED.

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

itervalues()

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
values() an object providing a view on D's values