The New Construction Plan (

This class inherits all the functionality of ConstructorPlanFactory. The only difference is that this factory will be able to construct the construction plan always. When creating the plan of construction, each time you create a new node is activated the function: public void beginNode (TreeDecompositionEvent e), from the parameter "e" we can extract the vertices and the edge of the current node and create an new instance of a ConstructionPlanNode (if the type is a leaf node).

Here lies the difference, because if you can not create the instance of ContructionPlanNode because there is not edge (a constraint), we will insert a new temporary constraint (we will use the function: private ConstructionPlanNode getAuxiliarConstraint (List vertices)).

In this part of code, we can see the new line instenta address the creation of an object ConstructionPlanNode:

if (e.isLeaf()) {
   // Leaf : we get its vertices (geometry) and edges (constraints)
   Graph g = e.getGraph();   
   List vertices = g.getVertices();
   node = ConstructionPlan.newConstructionPlanNodeInstance(vertices);
   if (node == null) node = getAuxiliarConstraint(vertices);
   // If there is not a construction plan for this node, 
   // abort the plan construction!
   if (node == null) ok = false;