engforge.solver_utils.ref_to_val_constraint

ref_to_val_constraint(system, comp, ctx, Xrefs, var_ref, kind, val, contype='ineq', return_ref=False, *args, **kwargs)[source]

takes a var reference and a value and returns a function that can be used as a constraint for min/max cases. The function will be a function of the comp and the info dictionary. The function will return the difference between the var value and the value.