(function from pyomo.contrib.mindtpy.util)
pyomo.contrib.mindtpy.util
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}\).
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.
The norm2 square objective function.
Objective