Quintiq file version 2.0
|
#parent: #root
|
Method GenerateBenchmark (
|
String namegroup,
|
Number endproductstoadd,
|
Number intermediatetoadd,
|
Number periodstoadd,
|
Boolean addtriplotsize,
|
Real usertriplotsize,
|
Boolean addptolotsize,
|
Real userptolotsize,
|
Boolean addptominqty,
|
Real userptominqty,
|
Boolean addinputlotsize,
|
Real userinputlotsize,
|
Boolean setlotcost,
|
Boolean setinventorybalancing,
|
Boolean addcapacitysmoothing,
|
Real smoothingdelta,
|
Boolean addpostponentspec,
|
Number postponementnrperiods
|
)
|
{
|
TextBody:
|
[*
|
/* example usage call via macroplan test method
|
|
namegroup := 'MyProduct';
|
endproductstoadd := 1; // create this many x 3 (body, tab, end)
|
intermediatetoadd := 1; // split intermediate products into this many
|
periodstoadd := 1;
|
|
addtriplotsize := true;
|
usertriplotsize := 100.0;
|
|
addptolotsize := true;
|
userptolotsize := 1000.0;
|
|
addptominqty := true;
|
userptominqty := 5000.0;
|
|
addinputlotsize := true;
|
userinputlotsize := 1000.0;
|
|
setlotcost := true;
|
|
setinventorymixbalancing := true;
|
|
addcapsmoothing := true;
|
smoothingdelta := 2.0; // 2% smoothing
|
|
addpostponement := true;
|
postponementnrperiods := 6; // parameter used for both horizon and max postponement
|
|
this.GenerateBenchmark( namegroup,
|
endproductstoadd,
|
intermediatetoadd,
|
periodstoadd,
|
addtriplotsize,
|
usertriplotsize,
|
addptolotsize,
|
userptolotsize,
|
addptominqty,
|
userptominqty,
|
addinputlotsize,
|
userinputlotsize,
|
setlotcost,
|
setinventorymixbalancing,
|
addcapsmoothing,
|
smoothingdelta,
|
addpostponement,
|
postponementnrperiods );
|
*/
|
|
// >>>>>>>>>>>>>>>>>>>>>>>>> script
|
|
this.GenerateBenchmarkAddEndProducts( endproductstoadd, namegroup );
|
group := select( this, Product_MP, p, p.ID() = namegroup );
|
|
addedbodys := selectset( group, AllChildren.AsChildren, p, true, p.Name() ~ 'Body' );
|
addedtabs := selectset( group, AllChildren.AsChildren, p, true, p.Name() ~ 'Tab' );
|
addedends := selectset( group, AllChildren.AsChildren, p, true, p.Name() ~ 'End' );
|
|
addedall := addedbodys.Union( addedtabs ).Union( addedends );
|
|
Transaction::Transaction().Propagate();
|
|
// Create intermediate product going down to ingot
|
intermediate_1 := this.GenerateBenchmarkAddIntermediateProducts( intermediatetoadd, addedall );
|
|
traverse( intermediate_1, Elements, p ) { debuginfo( 'created', p.ID() ) };
|
|
intermediate_2 := this.GenerateBenchmarkAddIntermediateProducts( intermediatetoadd, intermediate_1 );
|
traverse( intermediate_2, Elements, p ) { debuginfo( 'created', p.ID() ) };
|
|
intermediate_3 := this.GenerateBenchmarkAddIntermediateProducts( intermediatetoadd, intermediate_2 );
|
traverse( intermediate_3, Elements, p ) { debuginfo( 'created', p.ID() ) };
|
|
Transaction::Transaction().Propagate();
|
|
debuginfo( 'Adding periods' );
|
this.GenerateBenchmarkAddPeriods( periodstoadd );
|
|
if ( addtriplotsize )
|
{
|
this.GenerateBenchmarkAddTripLotsize( usertriplotsize );
|
}
|
|
if ( addptolotsize )
|
{
|
this.GenerateBenchmarkAddPTOLotsize( userptolotsize, setlotcost );
|
}
|
|
if ( addptominqty )
|
{
|
this.GenerateBenchmarkAddPTOProcMinQty( userptominqty );
|
}
|
|
if ( addinputlotsize )
|
{
|
this.GenerateBenchmarkAddInputLotSize( userinputlotsize );
|
}
|
|
if ( setinventorybalancing )
|
{
|
this.GenerateBenchmarkAddInventoryMixBalancing();
|
}
|
|
if ( addcapacitysmoothing )
|
{
|
this.GenerateBenchmarkAddCapacitySmoothing( smoothingdelta );
|
}
|
|
if ( addpostponentspec )
|
{
|
this.GenerateBenchmarkAddPostponementSpecification( postponementnrperiods );
|
}
|
|
// <<<<<<<<<<<<<<<<<<<<<<<<<<<< end script
|
*]
|
InterfaceProperties { Accessibility: 'Module' }
|
}
|