| Quintiq file version 2.0 | 
| #parent: #root | 
| Function CalcEISBeforeFactor | 
| { | 
|   TextBody: | 
|   [* | 
|     value := 0.0;  | 
|     eis := this.MacroPlan().OptimizerMetaEIS();  | 
|     if ( not isnull( eis )  | 
|          and eis.IsNeedEstimatedImprovementScores()  | 
|          and eis.StockingPointCapacityLevel() = eis.FocusLevelForEIS()  | 
|          and eis.StockingPointCapacityWeight() > 0 | 
|          and not this.IsPlannedWithinMaximumCapacity() )  | 
|     { | 
|       value := maxvalue(  (this.InventoryLevelEnd() - this.MaxCapacity() ) * eis.StockingPointCapacityWeight(), 0.0 );  | 
|       value := value + guard( this.NextSPIPPlanning().EISBeforeFactor(), 0.0 ); // improvement score is cumulative (prior to applying tried factor) | 
|     } | 
|     this.EISBeforeFactor( value ); | 
|   *] | 
|   InterfaceProperties { Accessibility: 'Module' } | 
| } |