Abstract:
A computer-implemented method for solving sets of linear arithmetic constraints modelling physical systems by programmed execution of mathematical operations in a processor unit, wherein the programmed execution of mathematical operations decide, given a set of constraints S, whether S has any solution, and if so, find one or more of them.

Description:
FIELD OF THE INVENTION 
       [0001]    The invention relates to data processing generally, and more particularly, to data processing under the guidance of a computer implemented method for search-based integer linear programming (ILP), involving the programmed execution of mathematical operations in a processor unit for deciding, given a set of constraints S, whether S has any solution, and if so, finding one or more of them. 
       DEFINITIONS 
       [0002]    Along this description following notions/terms will be used:
       A constraint over a finite set of variables, X {x 1  . . . x n } is an expression of the form a 1 x 1 + . . . +a n x n ≦a 0 , in which the coefficients a 0  . . . a n  are integer numbers.   A solution for a set S of constraints or integer program (IP) over {x 1  . . . x n } is a function Sol mapping each variable x of {x 1  . . . x n } to an integer value Sol(x) such that all constraints are satisfied, that is, for each constraint of the form a 1 x 1 + . . . +a n x n ≦a 0 , the integer number a 1 ·Sol(x 1 )+ . . . +a n ·Sol(x n ) is smaller than or equal to a 0 .   Optimization: maximizing (or minimizing) an objective function (or a cost function), an expression of the form a 1 x 1 + . . . +a n x n , that is, finding a solution Sol such that a 1 ·Sol(x 1 )+ . . . +a n Sol(x n ) is maximized (minimized).   MIP: Solving Mixed IPs (MIPs): finding solutions where some variables must take integer values and others can be arbitrary rationales.   A lower bound for a variable x is an expression of the form a≦x, where a is an integer number, and an upper bound for a variable x is an expression of the form x≦a, where a is an, integer number and a bound is an expression that is either a lower bound or an upper bound.   The negation of a lower bound a≦x is the upper bound x≦a−1 and the negation of an upper bound x≦a is the lower bound a+1≦x.   A lower bound a 1 ≦x and an upper bound x≦a 2  are called conflicting if a 1 &gt;a 2 .   A lower bound a≦x is called new in a given set of bounds B if there is no lower bound a′≦x in B with a′≧a, and an upper bound x≦a is called new in a given set of bounds B if there is no upper bound x≦a′ in B with a′≦a, and a variable x is called defined to the value a in a given set of bounds B, if B contains the bounds a≦x, and x≦a.   A monomial is an expression of the form a x, where a is an integer or a rational number and x is a variable. It is called negative if a is negative and positive otherwise.   Propagation:   If C is a linear arithmetic constraint of the form a 1 x 1 + . . . +a n x n ≦a 0  where:
           the subset of positive monomials of {a 1 x 1 , . . . , a n x n } is {ax, c 1 y 1 , . . . , c p y p };   the subset of negative monomials of {a 1 x 1  . . . a n x n } is {d 1 z 1 , . . . d q z q };   R is a set of bounds {l 1 ≦y 1 , . . . l p ≦y p , z 1 ≦u 1 , . . . , z q ≦u q };   u is the largest integer such that u≦(a 0 −c 1 l 1 − . . . c p l p −d 1 u 1 − . . . d q u q )/a,   then C and R propagate the upper bound x≦u.   
           For example, if C is 2x+3y+3z≦13 and R is {1≦x, 2≦y} then C and R propagate z≦1, since 1 is the largest integer u such that u≦(13−2·1−3·2)/3=(13−8)/3=5/3.   For example, if C is 2x≦13 and R is the empty set, then C and R propagate x≦6, since 6 is the largest integer u such that u≦13/2.   If C is a linear arithmetic constraint of the form a 1 x 1 + . . . +a n x n ≦a 0  where:
           the subset of positive monomials of {a 1 x 1 , . . . a n x n } is {c 1 y 1 , . . . c p y p };   the subset of negative monomials of a 1 x 1 , . . . , a n x n } is {ax, d 1 z 1 , . . . , d q z q };   R is a set of bounds {l 1 ≦y 1 , . . . , l p ≦y p , z 1 ≦u 1 , . . . , z q ≦u q };   l is the smallest integer such that l≧(a 0 −c 1 l 1 − . . . −c p l p −d 1 u 1 − . . . d q  u q )/a,   then C and R propagate the lower bound l≦x.   
           For example, if C is 2x+3y−3z≦13 and R is {1≦x, 2≦y} then C and R propagate −1≦z, since −1 is the smallest integer l such that l≧(13−2·1−3·2)/−3=(13−8)/−3=−5/3.
           Conflicting Subset or CSS, is a data structure storing a set of bounds.   Conflicting constraint or CC, is a data structure storing a linear arithmetic constraint.   Cut   If C 1  is a linear arithmetic constraint a 1 x 1 + . . . +a n x n ≦a 0  and C 2  is a linear arithmetic constraint b 1 x 1 + . . . +b n x n ≦b 0 , then a cut between C 1  and C 2  is a linear arithmetic constraint c 1 x 1 + . . . +c n x n ≦c 0  such that c and d are positive natural numbers and c 1 =c*a i +d·b i  for each i in 0 . . . n; and   If c j =0 for some j in 1 . . . n then this cut is said to eliminate the variable x j .   Learning a constraint   Given a set S of constraints and a constraint C, we say that C is learned if C is added to S.   
               
 
       BACKGROUND OF THE INVENTION 
       [0035]    Efficient ILP is crucial for many applications. For example, to find a feasible or optimal schedule in a limited period of time for a set of industrial tasks, where each task has a given duration and requires certain amounts of different limited resources (machines, trucks, employees). ILP (as well as SAT, see below) is NP-complete: no efficient (polynomial) algorithm for it has been found and the existence of such a polynomial algorithm is considered unlikely. 
         [0036]    The use of computer implemented ILP methods, models or algorithms for automatically solving with the aid of a processor unit, different integer problems expressed in the form of a set S of constraints appears disclosed in the following patents U.S. Pat. No. 7,653,561, U.S. Pat. No. 8,515,280, U.S. Pat. No. 8,402,396 and patent applications US 2011/0153709 and US 2012/0250500 addressing different technical fields. 
         [0037]    Just about any discrete optimization problem is an IP or a MIP: scheduling, routing, planning, configuration, timetabling, etc. 
         [0038]    One concrete physical application is the ‘knapsack’ problem that is following detailed. 
         [0039]    For instance, a truck will be going from A to B. There are n different types of items {1 . . . n} to be carried, where each type of item i has a i  units available, and each unit of it weights w i  kg and brings a profit of p i  per carried unit. 
         [0040]    The problem is to decide how many units x, of each item type i to carry, without exceeding the truck&#39;s total capacity of K kg, in order to make a total profit of at least P$: the IP will consist of W 1 x i + . . . +w n x n ≦K and p 1  x 1 + . . . +p n x n ≧P, with initial bounds 0≦x i ≦a i . 
         [0041]    The corresponding optimization problem is, instead of requiring the total profit p 1 x 1 + . . . +p n  x n  to be at least P $, to maximize it. 
         [0042]    There are numerous extensions of this problem, such as further constraints on, e.g., a maximal total number of units carried of certain subclasses of items, more than one truck, etc. 
         [0043]    Most current ILP methods work by iteratively solving LP relaxations, i.e., first finding rational (possibly non-integer) solutions for the set of constraints. Additional steps are then performed to progressively turn these solutions into an integer one, for example by cutting-plane or Branch-and-cut methods. 
         [0044]    The method described in this patent application performs no LP relaxations. It does a systematic search over the set of possible integer solutions. It borrows ideas from SAT solving, which can be seen as the special case of ILP where the variables x 1  . . . x n  can only take the values 0 or 1 (as in 0/1 integer programming) and where constraints are of the form l·x 1 + . . . +l·x m −l·y 1 − . . . −l·y n ≦m−l, expressed as clauses {  x   1 , . . . ,  x   m ,  y   1 , . . . ,  y   n } i.e., sets (disjunctions) of literals, where a literal is a either variable x or a negated variable  x . 
         [0045]    A basic SAT solving method is DPLL [1, 2] which comprises the following steps maintaining a partial assignment A, written here as a stack of literals that grows to the right:
       1. start with an empty partial assignment A   2. propagate while possible: extend A to A l if there is some clause {l}∪C with all its variables assigned in A except the one of l, and A∩C=φ   3. if there is some conflict, a clause C with all variables assigned and A∩C=φ, then go to step 6   4. if all variables are assigned and there is no conflict, halt with solution A   5. decide: take some unassigned variable x and extend A to A x or to A  x ; here the literal x or  x  is called a decision   6. backtrack: if there is some conflict and A is of the form A 1  l A 2 , where l is the rightmost decision in A, then replace A by A 1   l  (where  l  is not a decision)   7. if there is some conflict and A contains no decisions, then halt with output ‘no solution’   8. go to step 2.       
 
         [0054]    It is rather obvious that this procedure performs an exhaustive systematic search over all possible assignments. The key issues are its efficient implementation, that is, a) data structures and b) heuristics for guiding the search: which variables to decide on first and how to prune the search space. 
         [0055]    Indeed, modern extensions of the DPLL method include efficient data structures for propagation as disclosed in U.S. Pat. No. 7,418,369 and for clause learning, at each conflict, a new clause C can be added (learned), such that instead of backtrack one can do a backjump step, replacing A 1  l A 2  by A 1  l′ where C propagates l′ from A 1 . A single backjump step can undo several decisions as l needs not be the rightmost decision in A. 
         [0056]    Pioneering work on clause learning was given by Marques-Silva and Sakallah in [3]. Analysis of the most frequently used learning scheme, the 1-UIP one, was done by Moskewicz, et. al.[4]. Propagations by 1-UIP learned clauses prune the search space very effectively. Such SAT-solving techniques are nowadays called conflict-driven clause learning (CDCL). 
         [0057]    There have been several attempts to carry over CDCL from SAT to ILP. Then, clauses become constraints, literals become bounds (constraints with a single variable, that can be written as lower bounds a≦x or upper bounds x≦a), and propagation becomes bound propagation. 
         [0058]    An important problem for applying CDCL in ILP is the following rounding problem. Assume having the two constraints 1x+5y≦5 and 1x−5y≦0 and taking the decision 1≦x. Then from the first constraint y≦4/5, can be inferred, which is rounded, causing a bound propagation of the new bound y≦0, which, together with 1≦x causes a conflict with the second constraint. Now a cut inference, eliminating y generates the new learned 1-UIP constraint 2x≦5. But unfortunately, unlike what happens in SAT, it is too weak to force a backjump. This problem is due to the rounding that takes place when propagating y. 
         [0059]    In [5] the rounding problem is solved by limiting the kind of decisions that are allowed. This makes it possible, at each conflict caused by propagations with rounding, to compute so-called tightly propagating constraints that justify the same propagations without rounding. Drawbacks for performance are the complexity of computing the tightly propagating constraints, the limited kind of decisions and that the learned constraints are very different from the 1-UIP ones. 
         [0060]    This invention proposes another method to overcome the rounding problem. It permits arbitrary decisions and guide the search analogously to the 1-UIP approach in SAT. Consider again the two constraints C 1 : 1x+5y≦5 and C 2 : 1x−5y≦0. After taking the decision 1≦x, the constraint C 2  propagates 1≦y and C 1  propagates y≦0 (obtaining a conflicting pair of bounds). Now along with each propagated bound, it is not only remembered which constraint caused its propagation, but also the set of bounds that caused it. For example, the bound y≦0 has the associated reason set {1≦x} and reason constraint C 1 . Similarly, along with 1≦y the reason constraint C 2  and the reason set {1≦x} is stored. If a conflicting pair of bounds appears, a conflict analysis is done. 
         [0061]    First, the conflicting pair is stored in the so called CSS (here, {1≦y, y≦0}). Along the process this CSS always contains a set of bounds that is inconsistent together with the constraints. Similarly to the CDCL SAT solvers&#39; conflict analysis (but with bounds instead of literals) in the CSS the most recently propagated bound it is repeatedly replaced by its reason set. Here, after the first step, the CSS becomes {1≦x, y≦0}. After a finite number of such replacements, one always reaches a CSS that justifies a backjump. Here, after the second replacement (replacing y≦0 by 1≦x), the CSS becomes {1≦x}, inferring that 1≦x alone is also conflicting, so one can backjump to before the first decision and assert the negation of 1≦x, that is, x≦0. In our method this conflict analysis process in addition guides a sequence of cut inferences between the reason constraints of the bounds that are being replaced, and the finally resulting constraint can be learned. This backjumping method can always be applied, even if the learned constraint obtained using the cuts is too weak, due to the rounding problem, to justify this backjump. 
         [0062]    The idea of applying conflicting sets is remotely reminiscent to the learning techniques with literals from SAT Modulo Theories [6, 7]. A less related document, only for rational arithmetic, is [8]. 
       LIST OF CITED REFERENCES 
       [0000]    
       
         [1] M. Davis and H. Putnam, ‘A Computing Procedure for Quantification Theory’, Journal of the ACM, 7:201-215, 1960. 
         [2] M. Davis, G. Logemann and D. Loveland, ‘A Machine Program for Theorem-Proving’, Communications of the ACM, vol. 5, No. 7, pp. 394-397, 1962). 
         [3] Marques-Silva and Sakallah, ‘GRASP: A Search Algorithm for Propositional Satisfiability’, IEEE Transactions on Computers, Vol. 48, No. 5, May 1999, pp. 506-521. 
         [4] Moskewicz, et. al. ‘Chaff: Engineering an Efficient SAT Solver”, Jun. 18-22, 2001 DAC 2001 pp. 530-535. 
         [5] Jovanovic de Moura, ‘Cutting to the Chase—Solving Linear Integer Arithmetic”, J. Autom. Reasoning 51(1): 79-108 (2013). 
         [6] Nieuwenhuis et. al. ‘Solving SAT and SAT Modulo Theories: From an Abstract Davis-Putnam-Logemann-Loveland Procedure to DPLL(T)’, Journal of the ACM, 53(6), 937-977, 2006. 
         [7] Moura and Bjorner, ‘Satisfiability Modulo Theories: Introduction and Applications”: Commun. ACM 54(9): 69-77 (2011). 
         [8] Korovin and Voronkov, ‘Solving Systems of Linear Inequalities by Bound Propagation’, CADE 2011: 369-383. 
       
     
       SUMMARY OF THE INVENTION 
       [0071]    The invention proposes a computer-implemented method for solving sets S of linear arithmetic constraints modelling physical systems for deciding whether a given IP has any solution, and in the positive case finding one or more solutions. The invention comprises a number of data structures and algorithms, based on bound propagation and cuts that make a backtracking-based search procedure efficient and useful. 
         [0072]    In a characteristic manner, the computer-implemented method automatically performs the following steps using a processor unit:
       1a) feeding the set of linear arithmetic constraints S to the processor unit;   1b) creating a standard stack data structure B that is initially empty; said data structure containing a set of bounds and supporting the standard stack operations; said stack data structure B is stored in the processor and is being modified by considering the set of linear arithmetic constraints S by the subsequent steps;   1c) if there is a linear arithmetic constraint C in S and a set of bounds R in B such that C and R propagate a bound b that is new in B, then pushing b on top of the stack B, and associating to b the set R as its reason set and the linear constraint C as its reason constraint; and iterating this pushing and associating while possible;   1d) treating four non-overlapping cases:
           1d1) if there is no conflicting pair of bounds in B and if, for all i in {i . . . n} the variable x i  is defined in B to a value a i , then halt outputting the solution Sol such that Sol(x 1 )=a i  for each i in i . . . n;   1d2) if there is no conflicting pair of bounds in B and at least one variable is not defined in B, then a bound d is pushed on top of B such that d is new in B and d is not conflicting with any other bound in B, said bound d being called a decision;   1d3) if there is at least one conflicting pair of bounds b 1  and b 2  in B such that there is no decision in B below b 1  nor below b 2  then halt outputting “no solution”;   1d4) if there is at least one conflicting pair of bounds b 1  and b 2  in B such that there is at least one decision located in B below b 1  or below b 2  then perform a conflict analysis based on the current stack B and as a consequence of which firstly a number of topmost elements of the stack B are popped and after that a new bound with an associated reason set and reason constraint is pushed on top of the stack and a new linear constraint is learned;   
           1e) return to step 1c).       
 
         [0082]    In accordance with one embodiment, the conflict analysis further uses following two data structures:
       a Conflicting Subset and   a Conflicting Constraint,
 
and the proposed method includes the following automatic actions:
   2a) if the conflicting pair of bounds is {b 1 , b 2 } such that b 2  is located in the stack B above b 1 , then initializing the CSS to {b 1 , b 2 } and initializing the CC to the reason constraint of b 2 ;   2b) if b is the bound in the CSS that is located in the stack B closest to the top of B, then
           2b1) popping bounds from the top of stack B until there are no decisions above b in B;   2b2) removing b from the CSS and inserting into the CSS the reason set associated with b; and   2b3) performing a cut between the current CC and the reason constraint of b, in such a way that the variable of b is eliminated, thus obtaining a new CC; and if no such a cut exists, then the CC remains unchanged;   
           2c) if after popping k bounds including at least one decision from the stack B there is a set of bounds R in B such that CC and R propagate a bound b that is new in B, then popping k bounds from the stack B and pushing b on top of B with associated reason set R and reason constraint CC, and halting the conflict analysis;   2d) if the CSS contains more than one bound that is located in B up or above the topmost decision of B then going to step 2b);   2e) if the CSS contains exactly one bound b that is located in B up or above the topmost decision of B, then:
           2e1) if the CSS contains b as its unique element, then popping bounds from the stack B until B contains no decisions and after that pushing on the stack a new bound being the negation of b with an associated empty reason set and the final CC as its reason constraint; then this CC is learned,   2e2) if the CSS contains more than one bound, then if b 1  is the bound of the CSS different from b such that b 1  is located in the stack B closest to the top of B, above exactly k decisions, then popping bounds from the stack B until B contains exactly k decisions and after that pushing on the stack a new bound being the negation of b, having this new bound as its associated reason set the result of removing b from the CSS, and the final CC as its reason constraint, and then learning this CC.   
               
 
         [0095]    The step 2c) is optional and can be omitted. 
         [0096]    To be noted that, in particular, the first time step 2b) is performed no such a cut exists since in that case CC and the reason constraint of b are the same linear constraint. 
         [0097]    In one embodiment in step 2d), even if the CSS contains zero or one bound located in B up or above the topmost decision of B, then also going to step 2b). 
         [0098]    In another embodiment after each application of step 2b), bounds of the form a≦x are eliminated from the CSS whenever a bound a′≦x with a′&gt;a is in the CSS and bounds of the form x≦a are eliminated from the CSS whenever a bound x≦a′ with a′≦a is in the CSS. 
         [0099]    In an alternative approach in step 2b) instead of the reason set of b, a set of bounds R is computed and inserted in the CSS, with all elements of R being located below b in B and the reason constraint of b and R also propagating b. 
         [0100]    In an alternative approach in the step 1c) the reason set is not associated to b nor stored and in step 2b) a set of bounds R is computed and inserted in the CSS, with all elements of R being located below b in B and the reason constraint of b and R also propagating b. 
         [0101]    In accordance with an embodiment, in step 1c) the linear arithmetic constraint C is not associated to b and in step 1d4) the conflict analysis is performed omitting steps 2b3) and 2c) involving the CC, and no new constraint is learnt. 
         [0102]    In accordance with an embodiment, in step 1c) the iteration is performed non-exhaustively. 
         [0103]    In accordance with an embodiment, the linear arithmetic constraints further include expressions of the form a 1 x 1 + . . . +a n x n ≧a 0 , a 1 x 1 + . . . +a n x n &gt;a 0 , or a 1 x 1 + . . . +a n x n ≦a 0  or combinations thereof, where the coefficients a 0  . . . a n  can be arbitrary rational numbers, sets of which are all expressible by sets S of linear constraints of the form b 1 x 1 + . . . +b n x n ≦b 0 , with integer coefficients b 0  . . . b n  so that the resulting set of constraints S has the same set of solutions. 
         [0104]    Concerning the use for optimization of the method detailed in the previous embodiment, in order to find a solution Sol that minimizes the value of a 1 ·Sol(x 1 )+ . . . +a n ·Sol(x n ) for a given expression a 1 x 1 + . . . +a n x n , in a first iteration applying the method, and in successive iterations, while new solutions are found, applying the method with an additional constraint a 1 x 1 + . . . +a n x n ≦a 0  where a 0  is a 1 ·Sol(x 1 )+ . . . +a n ·Sol(x n )−1 where Sol is the solution found in the previous iteration. 
         [0105]    Further in order to find a solution Sol that maximizes the value of a 1 ·Sol(x 1 )+ . . . +a n ·Sol(x n ) for a given expression a 1 x 1 + . . . +a n x n , applying the previous embodiment minimizing −a 1 x 1 + . . . +−a n x n . 
         [0106]    According to another embodiment in step 2b) instead of popping and replacing the topmost bound b from the CSS another bound is popped and replaced by its reason set. 
         [0107]    According to another embodiment and in order to solve Mixed Integer Programs (MIPs), that is, to find a solution where a given subset I of the variables must take integer values and the remaining variables can take arbitrary rational values, it is proposed to use an arbitrary LP solver for finding a solution RSol minimizing the value of an expression a 1 x 1 + . . . +a n x n , where in RSol all variables are allowed to take rational values, outputting RSol as a solution and halting if RSol(x) is an integer for every variable x of I, and if no such a solution RSol exists, generating an infeasible subset using the LP solver and taking as CSS the subset of bounds of the infeasible subset, and taking as CC any other constraint of the infeasible subset, and continuing the conflict analysis with step 2b). 
         [0108]    Finally, in yet another embodiment the coefficients of the linear constraints are rational or floating point numbers. In this case, in step 1d4) the conflict analysis is performed using cuts where c and d are positive rational or floating point numbers. 
     
    
     DETAILED DESCRIPTION 
     Examples 
     Example 1 
       [0109]    This example involves the embodiment without reason constraints, without cuts and without learning new constraints. In this example, and in the following one, when a bound b in the stack B has exactly k decisions at or below it in B then b is said to belong to decision level (dl) k. 
         [0110]    Consider the following two constraints: 
         [0000]      1 x+ 1 y+ 3 z≦ 5 
         [0000]      −1 x− 1 y≦− 11
 
         [0111]    In addition, there are six one-variable constraints stating that all three variables are between −10 and 10. Note that these six constraints propagate the first six bounds with empty reason sets. Below the stack is shown (depicted here growing downwards) after propagating the initial constraints, and taking and propagating three decisions: 
         [0000]    
       
         
               
               
               
             
           
               
                   
                   
               
               
                   
                 bound 
                 reason set 
               
               
                   
                   
               
             
             
               
                   
                 −10 ≦ x 
                 { } 
               
               
                   
                 x ≦ 10 
                 { } 
               
               
                   
                 −10 ≦ y 
                 { } 
               
               
                   
                 Y ≦ 10 
                 { } 
               
               
                   
                 −10 ≦ z 
                 { } 
               
               
                   
                 z ≦ 10 
                 { } 
               
               
                   
                 1 ≦ x 
                 {y ≦ 10} 
               
               
                   
                 1 ≦ y 
                 {x ≦ 10} 
               
               
                   
                 z ≦ 1 
                 {1 ≦ x, 1 ≦ y} 
               
               
                   
                 7 ≦ y 
                 decision 
               
               
                   
                 z ≦ −1 
                 {1 ≦ x, 1 ≦ y} 
               
               
                   
                 x ≦ 5 
                 decision 
               
               
                   
                 −1 ≦ z 
                 decision 
               
               
                   
                 x ≦ 1 
                 {7 ≦ y, −1 ≦ z} 
               
               
                   
                 10 ≦ y 
                 {x ≦ 1} 
               
               
                   
                 x ≦ −2 
                 {10 ≦ y, −1 ≦ z} 
               
               
                   
                   
               
             
          
         
       
     
         [0112]    Now there is a conflict with initial CSS {1≦x, x≦−2}. 
         [0113]    In the first conflict analysis step, x≦−2 is removed from the CSS and its reason set {10≦y, −1≦z}, inserted obtaining {1≦x, −1≦z, 10≦y}. Since this CSS contains more than one bound of the highest decision level (dl 3), 10≦y is also replaced by its reason, getting {1≦x, −1≦z, x≦1}. Since there are still two bounds of dl 3, x≦1 is also replaced getting {1≦x, 7≦y, −1≦z}. After this, the conflict analysis process terminates, since this final CSS contains only one bound of dl 3, which in this case is the last decision itself, −1≦z. 
         [0114]    The negation of −1≦z is z≦−2, which is added to dl 1 (the dl of 7≦y) with reason set {1≦x, 7≦y}. Altogether, a backjump is done to: 
         [0000]    
       
         
               
               
               
             
           
               
                   
                   
               
               
                   
                 bound 
                 reason set 
               
               
                   
                   
               
             
             
               
                   
                 −10 ≦ x 
                 { } 
               
               
                   
                 x ≦ 10 
                 { } 
               
               
                   
                 −10 ≦ y 
                 { } 
               
               
                   
                 y ≦ 10 
                 { } 
               
               
                   
                 −10 ≦ z 
                 { } 
               
               
                   
                 z ≦ 10 
                 { } 
               
               
                   
                 1 ≦ X 
                 {y ≦ 10} 
               
               
                   
                 1 ≦ y 
                 {z ≦ 10} 
               
               
                   
                 z ≦ 1 
                 {1 ≦ x, 1 ≦ y} 
               
               
                   
                 7 ≦ y 
                 decision 
               
               
                   
                 z ≦ −1 
                 {1 ≦ x, 7 ≦ y} 
               
               
                   
                 z ≦ −2 
                 {1 ≦ x, 7 ≦ y} 
               
               
                   
                   
               
             
          
         
       
     
         [0115]    After one more propagation and two further decisions and their propagations, the following stack is obtained: 
         [0000]    
       
         
               
               
               
             
           
               
                   
                   
               
               
                   
                 bound 
                 reason set 
               
               
                   
                   
               
             
             
               
                   
                 −10 ≦ x 
                 { } 
               
               
                   
                 x ≦ 10 
                 { } 
               
               
                   
                 −10 ≦ y 
                 { } 
               
               
                   
                 y ≦ 10 
                 { } 
               
               
                   
                 −10 ≦ z 
                 { } 
               
               
                   
                 z ≦ 10 
                 { } 
               
               
                   
                 1 ≦ x 
                 {y ≦ 10} 
               
               
                   
                 1 ≦ y 
                 {x ≦ 10 } 
               
               
                   
                 z ≦ 1 
                 {1 ≦ x, 1 ≦ y} 
               
               
                   
                 7 ≦ y 
                 decision 
               
               
                   
                 z ≦ −1 
                 {1 ≦ x, 7 ≦ y} 
               
               
                   
                 z ≦ −2 
                 {1 ≦ x, 7 ≦ y} 
               
               
                   
                 −2 ≦ z 
                 decision 
               
               
                   
                 x ≦ 4 
                 {7 ≦ y, −2 ≦ z} 
               
               
                   
                 4 ≦ x 
                 decision 
               
               
                   
                 y ≦ 7 
                 {4 ≦ x, −2 ≦ z} 
               
               
                   
                 z ≦ −2 
                 {4 ≦ x, 7 ≦ y} 
               
               
                   
                   
               
             
          
         
       
     
         [0116]    It gives the solution where x=4, y=7 and z=−2, since all variables are fully defined to these values. 
       Example 2 
       [0117]    Consider the following three constraints: 
         [0000]        C   0 :+1 x− 3 y− 3 z≦ 1 
         [0000]        C   1 :−2 x+ 3 y+ 2 z≦− 2
 
         [0000]        C   2 :+3 x− 3 y+ 2 z≦− 1 
         [0000]    and the stack (depicted here growing downwards) with some initial bounds coming from one-variable constraints, and taking and propagating two decisions: 
         [0000]    
       
         
               
               
               
               
             
           
               
                   
                   
               
               
                   
                 bound 
                 reason set 
                 reason constraint 
               
               
                   
                   
               
             
             
               
                   
                 −2 ≦ x 
                 { } 
                   
               
               
                   
                 x ≦ 3 
                 { } 
               
               
                   
                 1 ≦ y 
                 { } 
               
               
                   
                 y ≦ 4 
                 { } 
               
               
                   
                 −2 ≦ z 
                 { } 
               
               
                   
                 z ≦ 2 
                 { } 
               
               
                   
                 1 ≦ x 
                 {1 ≦ y, −2 ≦ z} 
                 C 1   
               
               
                   
                 y ≦ 2 
                 {x ≦ 3, −2 ≦ z} 
                 C 1   
               
               
                   
                 z ≦ 0 
                 {x ≦ 3, 1 ≦ y} 
                 C 1   
               
               
                   
                 x ≦ 2 
                 decision 
               
               
                   
                 z ≦ −1 
                 {x ≦ 2, 1 ≦ y} 
                 C 1   
               
               
                   
                 z ≦ −2 
                 decision 
               
               
                   
                 x ≦ 1 
                 {y ≦ 2, z ≦ −2} 
                 C 0   
               
               
                   
                 2 ≦ y 
                 {1 ≦ x, z ≦ −2} 
                 C 0   
               
               
                   
                 2 ≦ x 
                 {2 ≦ y, −2 ≦ z} 
                 C 1   
               
               
                   
                   
               
             
          
         
       
     
         [0118]    Now there is a conflict with initial CSS {x≦1, 2≦x}. In the first conflict analysis step, 2≦x is removed from the CSS and its reason set {2≦y, −2≦z} inserted, obtaining the CSS {−2≦z, x≦1, 2≦y}, with two bounds of this decision level (dl 2). 
         [0119]    In the second conflict analysis step, 2≦y is replaced by its reason set {1≦x, z≦−2} obtaining the new CSS {−2≦z, 1≦x, z≦−2, x≦1} which does not allow yet to backjump since it still contains two bounds of dl 2. But now a cut is attempted between the initial CC, which is C 1 , and the reason constraint of 2≦y, which is C 0 , in such a way that y is eliminated. Here this cut exists, with c=d=1, and the new constraint C 3 : 
         [0120]    −1x−1 z≦−1 is obtained and learned. This new constraint allows one to backjump to dl 1, since there it propagates 2≦x. At that point, after three more propagations, 
         [0000]                                                bound   reason set   reason constraint                           −2 ≦ x   { }               x ≦ 3   { }           1 ≦ y   { }           y ≦ 4   { }           −2 ≦ z   { }           z ≦ 2   { }           1 ≦ x   {1 ≦ y, −2 ≦ z}   C 1             y ≦ 2   {x ≦ 3, −2 ≦ z}   C 1             z ≦ 0   {x ≦ 3, 1 ≦ y}   C 1             x ≦ 2   decision           z ≦ −1   {x ≦ 2, 1 ≦ y}   C 1             2 ≦ x   {z ≦ −1}   C 3             −1 ≦ z   {x ≦ 2}   C 3             2 ≦ y   {2 ≦ x, z ≦ −1}   C 0             2 ≦ x   {2 ≦ y, −1 ≦ z}   C 1                          
another conflict exists with CSS {x≦2, 3≦x}, which after the first step becomes {x≦2, −1≦z, 2≦y}, all three of this decision level (dl 1). After the second step (replacing 2≦y) the CSS becomes {x≦2, z≦−1, 2≦x, −1≦z}, all in dl 1. As before, the performed cut between C 1  and C 0  (the initial CC and the reason constraint of 2≦y) eliminates the variable y, obtaining −1x−1z≦−1.
 
         [0121]    After the third step (replacing −1≦z), the CSS becomes {x≦2, z≦−1, 2≦x}, all in dl 1. The CC does not change because no cut eliminating z exists with C 3 . 
         [0122]    After the 4th step (replacing 2≦x), the CSS becomes {x≦2, z≦−1}, both in dl 1. Again the CC does not change because no cut eliminating z exists with C 3 . 
         [0123]    After the 5th step (replacing z≦−1), the CSS becomes {1≦y, x≦2}, with only one literal of dl 1. The backjump with this CSS can take us to the dl of 1≦y (dl 0) and add there the negation of x≦2, which is 3≦x. 
         [0124]    The result of the cut on CC with C 1  eliminating z gives us −4x+3y≦−4. The backjump with this cut can also take us to the dl of 1≦y (dl 0), propagating 2≦x. Since this is weaker than the bound 3≦x obtained from the CSS, here the CSS one has been chosen. After two more propagations, the procedure returns ‘no solution’ since the conflicting pair of literals y≦2 and 3≦y appear at dl 0: 
         [0000]    
       
         
               
               
               
               
             
           
               
                   
                   
               
               
                   
                 bound 
                 reason set 
                 reason constraint 
               
               
                   
                   
               
             
             
               
                   
                 −2 ≦ x 
                 { } 
                   
               
               
                   
                 x ≦ 3 
                 { } 
               
               
                   
                 1 ≦ y 
                 { } 
               
               
                   
                 y ≦ 4 
                 { } 
               
               
                   
                 −2 ≦ z 
                 { } 
               
               
                   
                 z ≦ 2 
                 { } 
               
               
                   
                 1 ≦ x 
                 {1 ≦ y, −2 ≦ z} 
                 C 1   
               
               
                   
                 y ≦ x 
                 {x ≦ 3, −2 ≦ z} 
                 C 1   
               
               
                   
                 z ≦ 0 
                 {x ≦ 3, 1 ≦ y} 
                 C 1   
               
               
                   
                 3 ≦ x 
                 {1 ≦ y} 
                 C 4   
               
               
                   
                 −1 ≦ z 
                 {3 ≦ x, y ≦ 2} 
                 C 0   
               
               
                   
                 3 ≦ y 
                 {3 ≦ x, −1 ≦ z} 
                 C 0   
               
               
                   
                   
               
             
          
         
       
     
       Data Structures and Algorithms 
       [0125]    The method proposed in this invention heavily relies on the efficiency of its implementation, for which new data structures and algorithms are given. 
         [0126]    There is an array, the Bounds Array, indexed by variable number, that can return in constant time the current upper and lower bounds for that variable. Property 1: It always stores, for each variable x the positions pl i  and pu i  in the stack of its current (strongest) upper bound and lower bound, respectively, with pl i =0 (pu i =0) if x i  has no current lower (upper) bound. 
         [0127]    The data structure for the stack is another array containing at each position three data fields: a bound, a natural number pos, and an info field containing, among other information, the reason set and the reason constraint. Property 2: The value pos is always the position in the stack of the previous bound of the same type (lower or upper) for this variable, with pos=0 for initial bounds. 
         [0128]    When pushing a new bound on the stack, and when popping a bound from the stack (during backjumping), it is easy to maintain properties 1 and 2 in constant time. 
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
             
               
               
               
             
           
               
                 TABLE 1 
               
             
             
               
                   
               
               
                 Bounds array 
               
             
          
           
               
                   
                 Height in stack of 
                   
               
               
                   
                 current bound 
               
             
          
           
               
                   
                 Lower: 
                 upper 
               
               
                   
                   
               
             
          
           
               
                 x 1   
                 1 
                 2 
               
               
                 x 2   
                 0 
                 0 
               
               
                   
                 . 
                 . 
               
               
                   
                 . 
                 . 
               
               
                   
                 . 
                 . 
               
               
                 x 7   
                 40  
                 31  
               
               
                   
                 . 
                 . 
               
               
                   
                 . 
                 . 
               
               
                   
                 . 
                 . 
               
               
                   
               
             
          
         
       
     
         [0000]    
       
         
               
             
               
               
               
               
             
               
               
               
             
               
               
               
               
             
               
               
               
             
               
               
               
               
             
               
               
               
             
               
               
               
               
             
               
               
               
             
               
               
               
               
             
               
               
               
             
           
               
                 TABLE 2 
               
               
                   
               
               
                 Stack 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                 1 
                 0 ≦ x 1   
                 0 
                 info 
               
               
                 2 
                 x 1  ≦ 8 
                 0 
                 info 
               
             
          
           
               
                   
                 . 
                   
               
               
                   
                 . 
               
               
                   
                 . 
               
             
          
           
               
                 13 
                 0 ≦ x 7   
                 0 
                 info 
               
               
                 14 
                 x 7  ≦ 9 
                 0 
                 info 
               
             
          
           
               
                   
                 . 
                   
               
               
                   
                 . 
               
               
                   
                 . 
               
             
          
           
               
                 23 
                 2 ≦ x 7   
                 13 
                 info 
               
             
          
           
               
                   
                 . 
                   
               
               
                   
                 . 
               
               
                   
                 . 
               
             
          
           
               
                 31 
                 x 7  ≦ 6 
                 14 
                 info 
               
             
          
           
               
                   
                 . 
                   
               
               
                   
                 . 
               
               
                   
                 . 
               
             
          
           
               
                 40 
                 5 ≦ x 7   
                 23 
                 info 
               
             
          
           
               
                   
                 . 
                   
               
               
                   
                 . 
               
               
                   
                 . 
               
               
                   
                   
               
             
          
         
       
     
         [0129]    Another important data structure allows for efficient bound propagation. For each variable x, there are two occurs lists. The positive occurs list for x contains all pairs (I C , a) s.t. C is a linear constraint where x occurs with positive coefficient a. The negative occurs list contains the same for occurrences with a negative coefficient a. Here I C  is an index to the constraint header of C in the array of constraint headers. Each constraint header contains an integer F C  called a filter, and a (pointer to) the constraint C itself. The filter F C  is maintained cheaply, in such a way that C can only propagate if F C &gt;0, thus avoiding many useless (cache-) expensive inspections of the actual constraint C. This is done as follows. 
         [0130]    Let C be a constraint of the form a 1 x 1 + . . . +a n x n ≦a 0 . Let l i ≦x i  and x i ≦u i  be the current lower and upper bounds (if any) for x i . Each expression a i x i  in C can have a minimal value m i , which is a i ·l i  if a i &gt;=0, and a i ·u i  otherwise. 
         [0131]    Here m i  is undefined if there is no such bound l i  (or u i ). Initially, if some m i  is undefined, then F C  is set to a special value undefined and otherwise to −a 0 +m 1 + . . . +m n +max i , (abs (a i ·(u i −l i ))) where max and abs denote the maximum and absolute value functions, respectively. After that, Fc is said to be precise: the constraint C propagates if and only if, undefined≠F C &gt;0. Property 3: At all timepoints, F C =undefined or F C  is an upper approximation of the precise one. 
         [0132]    To preserve property 3, these filters need to be updated when new bounds are pushed onto the stack, and need to be restored when backjumping. 
         [0133]    Let a new lower bound k≦x be pushed onto the stack. Let the previous lower bound for x (if any) be k′≦x. For each pair (I C , a) in the positive occurs list of x, using I C , access is done to the F C  and increase it by abs (a·(k−k′)). If there was no previous lower bound, then F C  was undefined and is now set to 1. If F C  becomes positive, the constraint C is visited because it may propagate some new bound. After each time a constraint C is visited, F C  is set to its precise value. 
         [0134]    Let a new upper bound x≦k be pushed on the stack. Then exactly the same is done, where x≦k′ is the previous upper bound for x (if any), and using the negative occurs list. In order to be able to restore the filters when backjumping, each time an F C  value is increased by an amount d, a pair (F C , d) is pushed onto a filter backtrack stack, and when it is moved from undefined to 1a pair (F C , undefined) is pushed. 
         [0135]    For each decision that is taken, i.e., when pushing the i+1th decision on the stack, in a separate data structure a natural number h i  is recorded, h i  being the height of the filter backtrack stack before taking decision i+1. Then, when backjumping to a stack with k decisions, each pair (F C , d) in the filter backtrack stack above height h k  is popped, and its F C  is decreased by d if d≠undefined, and restored to undefined if d=undefined. 
         [0136]    While preferred embodiments of the invention have been shown and described herein, it will be understood that such embodiments are provided by way of example only. Numerous variations, changes and substitutions will occur to those skilled in the art without departing from the spirit of the invention. Accordingly, it is intended that the appended claims cover all such variations as fall within the spirit and scope of the invention.