Transforming and Refining Abstract Constraint Specifications Alan Frisch, Brahim Hnich*, Ian Miguel, Barbara Smith, and Toby Walsh *Cork Constraint Computation Center Supported by SFI
The Art of Modelling Informal description Modelling Formal description Modelling: mental process Modelling: Informal Formal
Modelling: conceptual gap Informal description Modelling Formal description Conceptual gap between the informal description of the problem and the formal one
“Easier” Modelling Informal description Modelling Formal description Reducing the conceptual gap makes modelling easier
In this talk… Informal description Formal description Combinatorial Optimisation Problems Constraint Satisfaction Problems
In this talk Informal description Modelling Formal description New conceptual gap Automatic Translation Abstract Formal Specification Intermediate models are easier to develop, understand, and maintain Automatically generated models are “efficient” (compared to what humans can produce) Formal description
Multiple levels of abstractions, transformations, and refinements Informal problem descriptions Abstract specification CSPs Conceptual gap reduced Easier modelling Automatic generation of alternate CP models through refinement Transformation
SONET problem Abstract Specification Refinement Abstract Specification + Implied Constraintss CP model 4CP model 3CP model 2CP model 1 Transformation Informal Specification Modelling
The SONET probelm Informal description: In a communications network, there are client nodes and known levels of demand between pairs of nodes. However, traffic can only be routed between pairs of distinct nodes if they are installed on the same SONET ring. A node is installed on a SONET ring via a dedicated add-drop multiplexer (ADM). Each node may be installed on multiple rings and demand between a pair of nodes may be split over several rings. The maximum number of rings available is known. Each ring has a capacity in terms of the volume of traffic and the number of nodes that can be installed on it. The objective is to minimise the number of ADMs used.
SONET problem: an instance Given 5 nodes, 3 rings Each ring has a node capacity of 4 Each ring has a traffic capacity of 6 And the following demand graph
An optimal solution Ring1 Ring2Ring3
An optimal solution(Simplified) Ring 1 Ring 2Ring 3 In this talk we ignore the demand levels
An abstract model The set of nodes The set of rings
An abstract model: relation variable In this talk we ignore the demand levels The set of nodes The set of rings Var R:x
An abstract model: Objective funtion The set of nodes The set of rings Var R:x Minimize the cardinality of R //minimizes the number of ADMs
An abstract model: capacity constraint The set of nodes The set of rings Var R:x Minimize the cardinality of R //minimizes the number of ADM For all r in rings. Cardinality of R -1 (r) is less than or equal to capacity R -1 (1)={1,2,3,4}
An abstract model: communication constraint The set of nodes The set of rings Var R:x Minimize the cardinality of R //minimizes the number of ADM For all r in rings. Cardinality of R -1 (r) is less than or equal to capacity For every pair node1 and node2 in the demand graph. R(node1) ∩ R(node2) ≠Ø R(3) ={1,2}
Transformation Starting from the abstract model, we derive 4 implied constraints IC1: imposes a lower bound on the number of ADMs IC2: imposes a lower bound on the number of open rings IC3: a node is installed in a ring only if it communicate with another node in the same ring IC4: the sum of capacities of any two non-empty rings exceeds the capacity of an individual ring..details in the paper
Transformation Starting from the abstract specification, we derive 4 implied constraints Problem-class transformation Work for all instances Keeps the model at the same level of abstraction
Refinement Refinement transforms an abstract model into a model at a lower level of abstraction Two main decisions How to represent abstract variables? How to translate the constraints? Optional tasks How to break symmetry, if it exists? Non-deterministic: a one-to-many mapping
Representing relation variable A B A 2d Boolean matrix M indexed by A and B in R iff M[a,b]=1
Representing relation variable A B {1} {1,2}{1}{2} A 1d matrix M indexed by A of set variables that are subsets of B in R iff b in M[a]
Representing relation variable A B {1,2,3,4}{3,5}{} A 1d matrix M indexed by B of set variables that are subsets of A in R iff a in M[b]
Representing relation variable A B {1,2,3,4}{3,5}{} A 1d matrix M1 indexed by B of set variables that are subsets of A in R iff a in M[b] {1} {1,2}{1}{2} A 1d matrix M2 indexed by A of set variables that are subsets of B in R iff b in M[a] a in M1[b] iff b in M2[a]
Translating constraints Constraints are rewritten based on the choice of representation E.g. …details are in the paper Minimize the cardinality of R Minimize the entries of the Boolean matrix
Breaking symmetry When we represent a relation variable as a 2d matrix for instance Pitfall: row and column symmetry introduced Can be detected while refining the abstract model Add symmetry breaking constraints to the refined model
Multiple levels of abstractions, transformations, and refinements Informal problem descriptions Abstract specification CSPs Conceptual gap reduced Easier modelling Automatic generation of alternate CP models through refinement Transformation