Quintiq file version 2.0
#parent: #root
Method FilterLanelegs () id:Method_FormSupplyChainOverview_FilterLanelegs
{
  #keys: '[136682.0.1955961067]'
  Body:
  [*
    //Filter laneleges
    //Laneg edges (Stockingpointnode)
    nodes := DataHolderNode.Data();
    stockingpointnods := selectset(  nodes, Elements.astype( StockingPointNode ), s, true, true );
    inputlaneleges := selectset(  stockingpointnods, Elements.AsDestinationStockingPoint, origin, true, true );
    outputlaneleges := selectset(  stockingpointnods, Elements.AsOriginStockingPoint, dest, true, true );
    stockingedge := inputlaneleges.Union( outputlaneleges );
    
    //Laneg edges (Unitnode)
    unitnodes := selectset(  nodes, Elements.astype( UnitNode ), s, true, true );
    unitdest := selectset(  unitnodes, Elements.AsDestinationUnit, origin, true, true );
    unitorigin := selectset( unitnodes, Elements.AsOriginUnit, dest, true, true );
    unitedge := unitorigin.Union( unitdest );
    
    nodelanelegeedges := stockingedge.Union( unitedge );
    
    DataHolderLaneLegEdge.Data( &nodelanelegeedges );
  *]
}
