Initializing help system before first use

implies

Purpose
Create an implies expression.
Synopsis
function implies(c1:log_or_linctr,c2:log_or_linctr):logctr
Arguments
c1 
A linear constraint ( linctr) or logical expression ( logctr)
c2 
A linear constraint ( linctr) or logical expression ( logctr)
Return value
A new logctr representing the expression.
Example
The following example shows several ways of stating the logical relation 'if x1≥10 then x1+x2≥12 and not x2≤5'. The implied constraint L is itself a logical constraint, built up by using the operators and and not in combination with linear constraints.
declarations
 R=1..2
 C: array(range) of linctr        ! Linear constraints
 L: logctr                        ! Logical constraint
 x: array(R) of mpvar             ! Decision variables
end-declarations

C(1):= x(1)>=10                   ! Define (temporary) linear ctrs
C(2):= x(2)<=5
C(3):= x(1)+x(2)>=12

implies(C(1), C(3) and not C(2))  ! State the implication
forall(j in 1..3) C(j):=0         ! Delete the auxiliary ctrs

! The same implication constraint can be stated by:
implies(x(1)>=10, x(1)+x(2)>=12 and not x(2)<=5)

! Or also by:
L:= x(1)+x(2)>=12 and not x(2)<=5 ! Define (temporary) logical ctr
implies(x(1)>=10, L)              ! State the implication
L:= 0                             ! Delete the auxiliary ctr
Further information
1. This function creates a logctr constraint representing an implies condition: if c1 is valid then c2 is enforced.
2. The helper package 'advmod' must be loaded if this function is used:
uses 'advmod'

Related topics
Module

© 2001-2022 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.