A quick fix is to redefine !=
operator. It will override other !=
operators so it's best to keep it in the smallest scope possible.
For example, I would keep it in a solve
function:
let solve args =
...
let (!=) (x: Decision) (y: Decision) = Term.op_Inequality(x, y)
model.AddConstraints("borders",
be != de, be != fr, be != nl, de != fr, de != nl) |> ignore
...
If you need multiple overloads of !=
, you should wrap Decision
in an F# discriminated unions and define all operators in F#'s way.
I use the quick fix above on the Who owns the Zebra example with MSF. The code is available here, which might be helpful for you.