Quintiq file version 2.0
|
#parent: #root
|
StaticMethod GetIsValidPeriodTask (
|
const Operation operation,
|
const Period_MP period
|
) const declarative remote as Boolean
|
{
|
Description: 'Check if the period task has incomplete DD (the dd is out of planning horizon) or if the operation is not valid in this period'
|
TextBody:
|
[*
|
unit := operation.Unit();
|
endoffrozen := unit.EndOfFrozen();
|
|
startdd := period.Start();
|
isvalid := period.IsPlanning()
|
// The dependent demand is not outside the horizon
|
|
if( operation.GetHasLeadTime() )
|
{
|
gp := operation.Unit().MacroPlan().GlobalParameters_MP();
|
startdd := Process_MP::GetDependentDemandEarliestStart( period, operation.LeadTime(), gp, operation );
|
isvalid := isvalid and startdd >= period.MacroPlan().Start(); // Return false if the dd falls outside planning horizon.
|
}
|
|
isvalid := isvalid and period.IsInPeriod( operation.ValidFrom(), operation.ValidTill() );
|
isvalid := isvalid and startdd >= endoffrozen;
|
|
return isvalid;
|
*]
|
}
|