ExternalInputOutputModel

(class from pyomo.contrib.pynumero.algorithms.solvers.pyomo_ext_cyipopt)

class pyomo.contrib.pynumero.algorithms.solvers.pyomo_ext_cyipopt.ExternalInputOutputModel[source]

Bases: object

This is the base class for building external input output models for use with Pyomo and CyIpopt

__init__()[source]

Methods

__init__()

evaluate_derivatives()

Compute the derivatives of the outputs with respect to the inputs (using the values set in input_values).

evaluate_outputs()

Compute the outputs from the model (using the values set in input_values) and return as a numpy array

set_inputs(input_values)

This method is called by the solver to set the current values for the input variables.

Member Documentation

abstract evaluate_derivatives()[source]

Compute the derivatives of the outputs with respect to the inputs (using the values set in input_values). This should be a dense matrix with the rows in the order of the output variables and the cols in the order of the input variables.

abstract evaluate_outputs()[source]

Compute the outputs from the model (using the values set in input_values) and return as a numpy array

abstract set_inputs(input_values)[source]

This method is called by the solver to set the current values for the input variables. The derived class must cache these if necessary for any subsequent calls to evaluate_outputs or evaluate_derivatives.