Quintiq file version 2.0
|
#parent: #root
|
StaticMethod Test (
|
MacroPlan this
|
)
|
{
|
TextBody:
|
[*
|
pispnames := construct( Strings );
|
|
traverse( this, SalesDemand.ProductInStockingPoint_MP, pisp )
|
{
|
if( not exists( pisp, ProcessOutput.AsProcessOutput.ProcessInput, processinput, true ) )
|
{
|
pispnames.Add( pisp.Name() );
|
}
|
else
|
{
|
dummyprocesses := selectset( pisp, ProcessOutput.AsProcessOutput, process, true );
|
index := 0;
|
limit := 10000;
|
|
while( index < dummyprocesses.Size()
|
and index < limit )
|
{
|
dummyprocess := dummyprocesses.Element( index );
|
index++;
|
|
pisps := construct( ProductInStockingPoint_MPs );
|
|
if( dummyprocess.istype( Operation ) )
|
{
|
pisps := selectset( dummyprocess, astype( Operation ).RoutingStep.Routing.InputPISPNodeInRouting.ProductInStockingPoint_MP, pisp2,
|
not pisp2.IsSystem() );
|
}
|
else if( dummyprocess.istype( LaneLeg ) )
|
{
|
pisps := selectset( dummyprocess, astype( LaneLeg ).LaneLegInput.ProductInStockingPoint_MP, pisp2,
|
pisp2.Product_MP() = pisp.Product_MP() );
|
}
|
|
traverse( pisps, Elements, pisp2 )
|
{
|
if( not exists( pisp2, ProcessOutput.AsProcessOutput.ProcessInput, processinput, true ) )
|
{
|
pispnames.Add( pisp2.Name() );
|
}
|
else
|
{
|
dummyprocesses2 := selectset( pisp2, ProcessOutput.AsProcessOutput, process, true );
|
dummyprocesses.AddInPlace( dummyprocesses2 );
|
}
|
}
|
}
|
}
|
}
|
|
pispnames := pispnames.Unique().Sort();
|
info( pispnames.ToString( String::NewLine() ) );
|
*]
|
}
|