admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
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
StaticMethod Create (
  Simulation_MP owner,
  ProductInStockingPointInPeriodPlanningLeaf pispip
) as SimulationPISPIP
{
  Description: 'Static method to create a SimulationPISPIP'
  TextBody:
  [*
    // Martijn Aug-23-2016 (created)
    
    result := owner.SimulationPISPIP( relnew );
    result.ProductInStockingPointInPeriodPlanningLeaf( relset, pispip );
    
    result.InventoryHoldingCost( maxvalue( 0.0, pispip.TotalBaseInventoryHoldingCost() ) )
    result.InventoryLevelEnd( maxvalue( 0.0, pispip.InventoryLevelEnd() ) );
    result.SalesDemandQty( maxvalue( 0.0, pispip.SalesDemandQuantity() ) );
    result.TargetInventoryLevel( pispip.TargetInventoryLevel() );
    result.UnfulfilledDemandQty( maxvalue( pispip.GetUnfulfilledQuantity() - pispip.TargetInventoryLevel(), 0.0) );
    result.HasStockout( result.UnfulfilledDemandQty() > 0.1 ); // ingore small values
    result.NewSupplyQty( pispip.NewSupplyQuantity());
    return result;
  *]
}