Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method Modify ( 
 | 
  GraphProgram program 
 | 
) 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    // Create new Shortest Path algorithm after edge value set "weights" have been updated 
 | 
     
 | 
    debuginfo( 'EXECUTE GRAPH ALGORITHM', 
 | 
               'Graph:', MEIO_Treeify::GetGraphName(this.MEIO_Engine().Product_MP().Name()) ); 
 | 
     
 | 
    graph := program.Graph( MEIO_Treeify::GetGraphName(this.MEIO_Engine().Product_MP().Name()), this ); 
 | 
     
 | 
    program.RemoveAllAlgorithms(); 
 | 
     
 | 
    weights := program.EdgeValueSet( MEIO_Treeify::GetEdgeValueSetWeights() ); 
 | 
    root := select( graph, Nodes, node, node.Name() = MEIO_Treeify::GetArtificialRootName() ); 
 | 
    sp := program.NewShortestPathAlgorithm( MEIO_Treeify::GetShortestPathName(), graph, weights ); 
 | 
     
 | 
    // Add configurations from all non-root nodes to root node 
 | 
    traverse( graph, Nodes, node, root <> node ) 
 | 
    { 
 | 
      sp.AddConfiguration( root, node, 1 ); 
 | 
    } 
 | 
  *] 
 | 
} 
 |