generate_norm2sq_objective_function

(function from pyomo.contrib.mindtpy.util)

pyomo.contrib.mindtpy.util.generate_norm2sq_objective_function(model, setpoint_model, discrete_only=False)[source]

This function generates objective (FP-NLP subproblem) for minimum euclidean distance to setpoint_model.

L2 distance of \((x,y) = \sqrt{\sum_i (x_i - y_i)^2}\).

Parameters:
  • model (Pyomo model) – The model that needs new objective function.

  • setpoint_model (Pyomo model) – The model that provides the base point for us to calculate the distance.

  • discrete_only (bool, optional) – Whether to only optimize on distance between the discrete variables, by default False.

Returns:

The norm2 square objective function.

Return type:

Objective