-
Notifications
You must be signed in to change notification settings - Fork 2
Description
When generating penalty functions for constraints like
As it is expected from PBF's that go $$ g: \mathbb{B}^{n} \to [a, b]
The question is: what to do when such things happen?
My first suggestion is:
# -*- Bounds & Slack Variable -*-
l, u = PBO.bounds(g)
s = if u < zero(T) # Always feasible
@warn "Always-feasible constraint detected"
continue
elseif l > zero(T) # Infeasible
@warn "Infeasible constraint detected"
error()
else
VM.expansion(VM.encode!(VM.Binary, model, nothing, zero(T), abs(l)))
endAlthough, I also suggest for continue and error() to be triggered by flags such as :ignore_feasible and :error_infeasible. Setting MOI termination status seems appropriate in the latter.