Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method Optimize 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    // Remove any previous graphs 
 | 
    this.DeleteGraph(); 
 | 
     
 | 
    // Delete old MEIO PISPIP targets 
 | 
    traverse( this, MEIO_Engine.MEIO_PISPIP_Target, mpt ) 
 | 
    { 
 | 
      mpt.Delete(); 
 | 
    } 
 | 
     
 | 
    // Create new graph program 
 | 
    program := construct( GraphProgram ); 
 | 
     
 | 
    // Initialize program 
 | 
    this.Initialize( program ); 
 | 
     
 | 
    // Create shortest path algorithm 
 | 
    this.Modify( program ); 
 | 
     
 | 
    // Execute algorithm 
 | 
    program.Execute(); 
 | 
     
 | 
    // Handle results 
 | 
    this.PostExecute( &program ); 
 | 
  *] 
 | 
} 
 |