Initializing help system before first use

# abs

Purpose
This constraint states that a variable y equals the absolute value of another variable x
Synopsis
`abs(x) = y with x,y:cpvar`
`abs(x) op I with x:cpvar and I:integer and op one of =, ≥, ≤, <>`
`x = abs(y) with x,y:cpvar`
`I op abs(x) with I:integer and x:cpvar and op one of =, ≥, ≤, <>`
Arguments

x | absolute value variable (of type cpvar, cpfloatvar, cplinexp, cpnlinexp)
y | value variable (of the same type as x)
I | integer value

Return value
An absolute value constraint over the arguments
Example
See the example provided for distance on how to use the absolute value constraint.
Related topics
distance
Parent Topic Constraints

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.