SDM {
    GraphLayout : "true";
    LinkLayout : "false";
    // renderingDoneMode NEVER
    renderingDoneMode : 2;
}

node {
    class : "ilog.views.sdm.graphic.IlvGeneralNode";
    shapeType : "Diamond";
    shapeWidth : "40";
    shapeHeight : "40";
    label : "@name";
    labelPosition : "Center";
    labelScaleFactor: "0.5";
    fillStyle : "LINEAR_GRADIENT";
    fillColor1 : "cyan";
    fillColor2 : "yellow";
}

link {
    class : "ilog.views.sdm.graphic.IlvGeneralLink";
    oriented = "true";
    foreground : "black";
    lineWidth : "2";
    arrowRatio : "2";
}

GraphLayout {
    enabled              : "true";
    graphLayout          : "Hierarchical";
    flowDirection        : "Bottom";
    horizontalNodeOffset : 20;
    verticalNodeOffset   : 20;
}

// In CSS, constraints except extremity constraints must have a name.

// Constraint A: node 2 and node 5 should be at the same level

#node2 {
   FirstSameLevelConstraint: "ConstraintA";
}

#node5 {
   SecondSameLevelConstraint: "ConstraintA";
}

// Constraint B: node 5 should be at a lower level than node 9, with priority 50

#node5 {
   LowerRelativeLevelConstraint: "ConstraintB,50";
}

#node9 {
   HigherRelativeLevelConstraint: "ConstraintB,50";
}

// Constraint C: node 10 should be at a lower level than node 9

#node10 {
   LowerRelativeLevelConstraint: "ConstraintC";
}

#node9 {
   HigherRelativeLevelConstraint: "ConstraintC";
}
  
// Constraint D: node 11 and 12 should be at level range 3-4

#node11 {
   LevelRangeConstraint: "ConstraintD,3,4";
}

#node12 {
   LevelRangeConstraint: "ConstraintD,3,4";
}

// Constraint E: node 13, 14 and 15 should be in a group at maximum 2 levels

#node13 {
   GroupSpreadConstraint: "ConstraintE,1";
}

#node14 {
   GroupSpreadConstraint: "ConstraintE,1";
}

#node15 {
   GroupSpreadConstraint: "ConstraintE,1";
}

// Constraint F: node 11, 13 and 3 should be at the same level. As an alternative
// to the same-level constraint, there is the group-spread
// constraint.

#node3 {
   GroupSpreadConstraint: "ConstraintF,0";
}

#node11 {
   GroupSpreadConstraint: "ConstraintF,0";
}

#node13 {
   GroupSpreadConstraint: "ConstraintF,0";
}

// node 16 should be at the highest level

#node16 {
   ExtremityConstraint: "SOUTH";
}

// Constraint G: node 11 should be close to node 3

#node3 {
   SideBySideConstraint: "ConstraintG,50";
}

#node11 {
   SideBySideConstraint: "ConstraintG,50";
}

// Constraint H: node 2 should be close to node 5

#node2 {
   SideBySideConstraint: "ConstraintH,50";
}

#node5 {
   SideBySideConstraint: "ConstraintH,50";
}


// Constraint I: node 2 should be right of node 5

#node2 {
   LowerRelativePositionConstraint: "ConstraintI,50";
}

#node5 {
   HigherRelativePositionConstraint: "ConstraintI,50";
}


