static void AddGoalToKeepFlatEdgesShortOnBlockLevel(LayerInfo layerInfo, ISolverShell solver)
 {
     if (layerInfo != null)
     {
         foreach (var couple in layerInfo.flatEdges)
         {
             int sourceBlockRoot = NodeToBlockRootSoftOnLayerInfo(layerInfo, couple.Item1);
             int targetBlockRoot = NodeToBlockRootSoftOnLayerInfo(layerInfo, couple.Item2);
             if (sourceBlockRoot != targetBlockRoot)
             {
                 solver.AddGoalTwoVariablesAreClose(sourceBlockRoot, targetBlockRoot);
             }
         }
     }
 }
 void PutVerticalConstraintsIntoSolver(ISolverShell solver) {
     foreach (var pair in horizontalConstraints.VerticalInts) {
         solver.AddGoalTwoVariablesAreClose(pair.Item1, pair.Item2, ConstrainedVarWeight);
     }
 }
 static void AddGoalToKeepFlatEdgesShortOnBlockLevel(LayerInfo layerInfo, ISolverShell solver) {
     if (layerInfo != null)
         foreach (var couple in layerInfo.flatEdges) {
             int sourceBlockRoot = NodeToBlockRootSoftOnLayerInfo(layerInfo, couple.Item1);
             int targetBlockRoot = NodeToBlockRootSoftOnLayerInfo(layerInfo, couple.Item2);
             if (sourceBlockRoot != targetBlockRoot)
                 solver.AddGoalTwoVariablesAreClose(sourceBlockRoot, targetBlockRoot);
         }
 }
        void AddGoalsToKeepProperEdgesShort(ISolverShell solver) {
            foreach (var edge in ProperLayeredGraph.Edges)
                solver.AddGoalTwoVariablesAreClose(edge.Source, edge.Target, PositionOverBaricenterWeight);

        }