Commit 8ece605d authored by Teresa Piovesan's avatar Teresa Piovesan Committed by Tjerk Vreeken

Handle fix_minimized_values for normal goals

The fix_minimized_values goal programming option only affected path
goals. The same logic should however apply to normal goals.
parent f7d3b695
......@@ -625,8 +625,12 @@ class GoalProgrammingMixin(OptimizationProblem, metaclass=ABCMeta):
# Epsilon encodes the position within the function range.
fix_value = True
constraint.min = (epsilon - goal.relaxation) / goal.function_nominal
constraint.max = (epsilon + goal.relaxation) / goal.function_nominal
if options['fix_minimized_values'] and goal.relaxation == 0.0:
constraint.min = epsilon / goal.function_nominal
constraint.max = epsilon / goal.function_nominal
else:
constraint.min = -np.inf
constraint.max = (epsilon + goal.relaxation) / goal.function_nominal
# Epsilon is fixed. Override previous {min,max} constraints for
# this state.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment