haorenhui
2023-10-30 6d6cc10d9e8e242661da7fd655dec155a09d676c
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Quintiq file version 2.0
#parent: #root
Method GenerateBenchmarkIncreaseCapacity (
  Real ratio
)
{
  TextBody:
  [*
    traverse( this, Unit.UnitAvailability, avail ) 
    {
      avail.Efficiency( avail.Efficiency() * ratio ); 
    }
    
    traverse( this, Unit.UnitCapacity, cap ) 
    {
      cap.MaxCapacity( cap.MaxCapacity() * ratio ); 
    } 
    
    traverse( this, StockingPoint_MP.StockingPointCapacity, spc ) 
    {
      spc.MaxCapacity( spc.MaxCapacity() * ratio ); 
    }
    
    traverse( this, Unit.TransportCapacity, tcap ) 
    {
      tcap.MaximumCapacity( tcap.MaximumCapacity() * ratio ); 
      tcap.SecondaryMaximumCapacity( tcap.SecondaryMaximumCapacity() * ratio ); 
    }
    
    traverse( this, Unit.TransportAvailability, tavail) 
    {
      tavail.MaximumQuantity( tavail.MaximumQuantity() * ratio ); 
    }
    
    gp := this.GlobalParameters_MP(); 
    gp.DefaultMaxLoadPercentage( gp.DefaultMaxLoadPercentage() * ratio ); 
    gp.DefaultMaxCapacityPerDayForUnit( gp.DefaultMaxCapacityPerDayForUnit() * ratio ); 
    gp.DefaultMaxCapacityForStockingPoint( gp.DefaultMaxCapacityForStockingPoint() * ratio ); 
    gp.DefaultEfficiency( gp.DefaultEfficiency() ); 
    
    
    // update actual inventories using ratio
    traverse( this, Actual.astype( ActualProductInStockingPointInPeriod ), a ) 
    {
      a.ActualInventoryLevelEnd( a.ActualInventoryLevelEnd() * ratio ); 
    }
    
    // ? inventory supplies . not present in dataset metal demo
  *]
  InterfaceProperties { Accessibility: 'Module' }
}