PersistentSolverConfig

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

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

Bases: SolverConfig

Base config for all persistent solver interfaces

Options:
  • tee (TextIO_or_Logger, default=False) – tee accepts bool, io.TextIOBase, or logging.Logger (or a list of these types). True is mapped to sys.stdout. The solver log will be printed to each of these streams / destinations.

  • working_dir (Path, optional) – The directory in which generated files should be saved. This replaces the keepfiles option.

  • load_solutions (Bool, default=True) – If True, the values of the primal variables will be loaded into the model.

  • raise_exception_on_nonoptimal_result (Bool, default=True) – If False, the solve method will continue processing even if the returned result is nonoptimal.

  • symbolic_solver_labels (Bool, default=False) – If True, the names given to the solver will reflect the names of the Pyomo components. Cannot be changed after set_instance is called.

  • timer (optional) – A timer object for recording relevant process timing data.

  • threads (NonNegativeInt, optional) – Number of threads to be used by a solver.

  • time_limit (NonNegativeFloat, optional) – Time limit applied to the solver (in seconds).

  • solver_options (dict, optional) – Options to pass to the solver.

  • auto_updates (AutoUpdateConfig, optional) – Configuration options to detect changes in model between solves

__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