LegacyIpoptSolver

(class from pyomo.contrib.solver.solvers.ipopt)

class pyomo.contrib.solver.solvers.ipopt.LegacyIpoptSolver(**kwargs)[source]

Bases: LegacySolverWrapper, Ipopt

__init__(**kwargs)

Methods

__init__(**kwargs)

api_version()

Return the public API supported by this interface.

available([exception_flag])

Returns a bool determining whether the requested solver is available on the system.

config_block([init])

Preserves config backwards compatibility; allows new solver interfaces to be used in the pyomo solve call

default_variable_value()

has_linear_solver(linear_solver)

Determine if Ipopt has access to the specified linear solver

is_persistent()

True if this supports a persistent interface to the solver.

license_is_valid()

Test if the solver license is valid on this system.

set_options(options)

Method to manually set options; can be called outside of the solve method

solve(model[, tee, load_solutions, logfile, ...])

Solve method: maps new solve method style to backwards compatible version.

version()

Return the solver version found on the system.

warm_start_capable()

Attributes

CONFIG

Global class configuration; see CONFIG.

name

config

Instance configuration; see CONFIG.

Member Documentation

classmethod api_version()

Return the public API supported by this interface.

Returns:

A solver API enum object

Return type:

SolverAPIVersion

available(exception_flag=True)

Returns a bool determining whether the requested solver is available on the system.

config_block(init=False)

Preserves config backwards compatibility; allows new solver interfaces to be used in the pyomo solve call

has_linear_solver(linear_solver: str) bool

Determine if Ipopt has access to the specified linear solver

This solves a small problem to detect if the Ipopt executable has access to the specified linear solver.

Parameters:

linear_solver (str) – The linear solver to test. Accepts any string that is valid for the linear_solver Ipopt option.

is_persistent() bool

True if this supports a persistent interface to the solver.

Returns:

is_persistent – True if the solver is a persistent solver.

Return type:

bool

license_is_valid() bool

Test if the solver license is valid on this system.

Note that this method is included for compatibility with the legacy SolverFactory interface. Unlicensed or open source solvers will return True by definition. Licensed solvers will return True if a valid license is found.

Returns:

available – True if the solver license is valid. Otherwise, False.

Return type:

bool

set_options(options)

Method to manually set options; can be called outside of the solve method

solve(model: BlockData, tee: bool = False, load_solutions: bool = True, logfile: str | None = None, solnfile: str | None = None, timelimit: float | None = None, report_timing: bool = False, solver_io: str | None = None, suffixes: Sequence | None = None, options: Dict | None = None, keepfiles: bool = False, symbolic_solver_labels: bool = False, raise_exception_on_nonoptimal_result: bool = False, solver_options: Dict | None = None, writer_config: Dict | None = None)

Solve method: maps new solve method style to backwards compatible version.

Returns:

Legacy results object

Return type:

legacy_results

version() tuple[int, int, int] | None

Return the solver version found on the system.

Returns:

version – A tuple representing the version

Return type:

tuple

CONFIG = <pyomo.contrib.solver.solvers.ipopt.IpoptConfig object>

Global class configuration; see CONFIG.

config

Instance configuration; see CONFIG.