FIMExternalGreyBox

(class from pyomo.contrib.doe.grey_box_utilities)

class pyomo.contrib.doe.grey_box_utilities.FIMExternalGreyBox(doe_object, objective_option='determinant', logger_level=None)[source]

Bases: ExternalGreyBoxModel

__init__(doe_object, objective_option='determinant', logger_level=None)[source]

Grey box model for metrics on the FIM. This methodology reduces numerical complexity for the computation of FIM metrics related to eigenvalue decomposition.

Parameters:
  • doe_object – Design of Experiments object that contains a built model (with sensitivity matrix, Q, and fisher information matrix, FIM). The external grey box model will utilize elements of the doe_object model to build the FIM metric with consistent naming.

  • obj_option – String representation of the objective option. Current available options are: determinant (D-optimality), trace (A-optimality), minimum_eigenvalue (E-optimality), condition_number (modified E-optimality). default: determinant

  • logger_level

    logging level to be specified if different from doe_object’s logging level. default: None, or equivalently, use the logging level of doe_object.

    NOTE: Use logging.DEBUG for all messages.

Methods

__init__(doe_object[, objective_option, ...])

Grey box model for metrics on the FIM.

equality_constraint_names()

Provide the list of string names corresponding to any residuals for this external model.

evaluate_equality_constraints()

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

evaluate_grad_objective([out])

Compute the gradient of the objective from the values set in input_values

evaluate_hessian_equality_constraints()

evaluate_hessian_outputs()

evaluate_jacobian_equality_constraints()

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

evaluate_jacobian_outputs()

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

evaluate_objective()

Compute the objective from 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

finalize_block_construction(pyomo_block)

Implement this callback to provide any additional specifications to the Pyomo block that is created to represent this external grey box model.

get_equality_constraint_scaling_factors()

This method is called by the solver interface to get desired values for scaling the equality constraints.

get_output_constraint_scaling_factors()

This method is called by the solver interface to get desired values for scaling the constraints with output variables.

has_objective()

input_names()

Provide the list of string names to corresponding to the inputs of this external model.

n_equality_constraints()

This method returns the number of equality constraints.

n_inputs()

This method returns the number of inputs.

n_outputs()

This method returns the number of outputs.

output_names()

Provide the list of string names corresponding to the outputs of this external model.

set_equality_constraint_multipliers(...)

This method is called by the solver to set the current values for the multipliers of the equality constraints.

set_input_values(input_values)

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

set_output_constraint_multipliers(...)

This method is called by the solver to set the current values for the multipliers of the output constraints.

Member Documentation

equality_constraint_names()[source]

Provide the list of string names corresponding to any residuals for this external model. These should be in the order corresponding to values returned from evaluate_residuals. Return an empty list if there are no equality constraints.

evaluate_equality_constraints()[source]

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

evaluate_grad_objective(out=None)

Compute the gradient of the objective from the values set in input_values

evaluate_jacobian_equality_constraints()[source]

Compute the derivatives of the residuals with respect to the inputs (using the values set in input_values). This should be a scipy matrix with the rows in the order of the residual names and the cols in the order of the input variables.

evaluate_jacobian_outputs()[source]

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

evaluate_objective() float

Compute the objective from the values set in input_values

evaluate_outputs()[source]

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

finalize_block_construction(pyomo_block)[source]

Implement this callback to provide any additional specifications to the Pyomo block that is created to represent this external grey box model.

Note that pyomo_block.inputs and pyomo_block.outputs have been created, and this callback provides an opportunity to set initial values, bounds, etc.

get_equality_constraint_scaling_factors()

This method is called by the solver interface to get desired values for scaling the equality constraints. None means no scaling is desired. Note that, depending on the solver, one may need to set solver options so these factors are used

get_output_constraint_scaling_factors()

This method is called by the solver interface to get desired values for scaling the constraints with output variables. Returning None means that no scaling of the output constraints is desired. Note that, depending on the solver, one may need to set solver options so these factors are used

input_names()[source]

Provide the list of string names to corresponding to the inputs of this external model. These should be returned in the same order that they are to be used in set_input_values.

n_equality_constraints()

This method returns the number of equality constraints. You do not need to overload this method in derived classes.

n_inputs()

This method returns the number of inputs. You do not need to overload this method in derived classes.

n_outputs()

This method returns the number of outputs. You do not need to overload this method in derived classes.

output_names()[source]

Provide the list of string names corresponding to the outputs of this external model. These should be in the order corresponding to values returned from evaluate_outputs. Return an empty list if there are no computed outputs.

set_equality_constraint_multipliers(eq_con_multiplier_values)[source]

This method is called by the solver to set the current values for the multipliers of the equality constraints. The derived class must cache these if necessary for any subsequent calls to evaluate_hessian_equality_constraints

set_input_values(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.

set_output_constraint_multipliers(output_con_multiplier_values)[source]

This method is called by the solver to set the current values for the multipliers of the output constraints. The derived class must cache these if necessary for any subsequent calls to evaluate_hessian_outputs