Quintiq file version 2.0
|
#parent: #root
|
Function CalcMinQuantityFactor
|
{
|
TextBody:
|
[*
|
// The factor is defined as the input min quantity in PISP uom divided by the output quantity in PISP uom.
|
targetuom := this.PISPUnitOfMeasurement();
|
uomconversion := this.Operation().GetUOMConversionFactor( targetuom );
|
|
// Not using QuantityToProcess as the attribute is affected if we exclude some output from unit utilization
|
outputbased := this.Operation().Unit().IsQuantityToProcessAsOut();
|
outputqtyinspuom := uomconversion * ifexpr( outputbased, this.Operation().OutputQuantity(), this.Operation().InputQuantity() );
|
|
value := guard( this.MinQuantity() / outputqtyinspuom, 0.0 );
|
|
this.MinQuantityFactor( value );
|
*]
|
}
|