Quintiq file version 2.0 
 | 
#parent: #root 
 | 
DeclarativeReferenceRelation CalcProductInStockingPointInPeriodPlanningLeafWhenUpstreamNonFrozenForTrip 
 | 
{ 
 | 
  #keys: '1[141320.5.1225104631]' 
 | 
  Expression: 
 | 
  [* 
 | 
    value := null( ProductInStockingPointInPeriodPlanningLeaf ); 
 | 
    if ( not this.PeriodTask_MP().IsFrozenForOptimizerUpstream() )  
 | 
    { 
 | 
      pispip := this.ProductInStockingPointInPeriodPlanningLeafWhenForTrip();   
 | 
      if ( not isnull( pispip )  
 | 
           and this.ProductInTrip().IsInOptimizerPuzzle() 
 | 
           and not this.ProductInTrip().Trip().Departure() < this.ProductInTrip().Trip().LaneLeg().Lane().Unit().EndOfFrozen() )  
 | 
      { 
 | 
        value := pispip;  
 | 
      } 
 | 
    } 
 | 
    return value; 
 | 
  *] 
 | 
  Relation: ProductInStockingPointInPeriodPlanningLeafWhenTripForMeta 
 | 
} 
 |