In reply to marathuteja:
Calling user-defined function in constraints should be done carefully, because the function shall be called before constraints are solved (no back-track done by the solver to find proper function input), and this is a source potential constraints conflicts.