| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 | | Quintiq file version 2.0 |  | #parent: #root |  | Method StockinLeaf ( |  |   ProductInStockingPoint_MP pisp, |  |   Number period, |  |   Real target |  | ) as Real |  | { |  |   TextBody: |  |   [* |  |     // this will calculate the service level  |  |     // on leaf location |  |     pispip := pisp.GetPISPIPFromPeriodNumber( period );   |  |     pispip.MEIO_Target( target ); |  |      |  |     stockin_p := this.NextS( period, pisp );  |  |     stockin_p := ProbabilityDistribution::Sum( stockin_p, MEIO_Engine::GetDemandDistributionTimesMinusOne( pisp, period ) ); |  |     stockin_p := ProbabilityDistribution::Sum( stockin_p, this.NextRe( period, pisp ) );  |  |      |  |     value := 1.0 - stockin_p.Cdf( 0.0 );  |  |     pispip.MEIO_Stockin( value );  |  |      |  |     return value |  |   *] |  | } | 
 |