Quintiq file version 2.0
|
#parent: #root
|
Method UpdateParameters (Period_MP periodstart, Period_MP periodend, Number maxnumberofthreads)
|
{
|
Description: 'Updates attributes of the AlgorithmRun'
|
TextBody:
|
[*
|
param := periodstart.MacroPlan().Algorithm_Parameter();
|
this.MaxNumberOfThreadsBenchmarking( maxnumberofthreads );
|
this.HasOverwrittenManualPlanning( param.IsOverrideLockedPlanning() );
|
this.IsInventoryOptimizationRun( param.IsInventoryOptimizationRun() );
|
this.PeriodFirstStart( periodstart.Start() );
|
this.PeriodFirstEnd( periodstart.PeriodEnd() );
|
this.PeriodLastStart( periodend.Start() );
|
this.PeriodLastEnd( periodend.PeriodEnd() );
|
this.IsPostProcessing( param.IsPostProcessing() );
|
this.IsUsingSelectedUnits( param.IsUsingSelectedUnits() );
|
this.HasTotalSupplyUser( param.HasTotalSupplyUser() );
|
this.TotalSupplyUser( param.TotalSupplyUser() );
|
this.IsMiddleOutSmartPlan( param.IsMiddleOutSmartPlan() );
|
this.IsUpstreamSmartPlan( param.IsUpstreamSmartPlan() );
|
this.IsSync( param.IsSync() );
|
|
this.IsOnlyPlanOneStepUpstream( param.IsOnlyPlanOneStepUpstream() );
|
if( param.IsForceNoAutoScaling() )
|
{
|
this.IsAutoScalingEnabled( false );
|
}
|
|
globalparameters := periodstart.MacroPlan().GlobalParameters_MP();
|
|
// Save the parameters of the sliding window approach in the algorithm run
|
// Only enable the sliding windows approach if a lotsize goal has been added to the strategy
|
// Otherwise there are no integer variables and the sliding windows approach would thus only slow down the optimizer run
|
isslidingwindowsrun := globalparameters.UseSlidingWindowsApproach()
|
and ( this.UseLotCost() or this.UseLotSize() );
|
|
this.IsSlidingWindowsRun( isslidingwindowsrun );
|
if( isslidingwindowsrun )
|
{
|
this.NumberOfPeriodsInWindow( globalparameters.NumberOfPeriodsInWindow() );
|
this.NumberOfPeriodsPerSlide( globalparameters.NumberOfPeriodsPerSlide() );
|
}
|
*]
|
}
|