Quintiq file version 2.0
|
#parent: #root
|
Method CapacityPlanningAlgorithmHandleFeasibleTrip (
|
CapacityPlanningSuboptimizer_CapacityPlanningAlgorithm program,
|
LibOpt_Scope scope
|
)
|
{
|
Description: 'Assign the optimal quantity from optimizer for period task planned quantity'
|
TextBody:
|
[*
|
// Assign the new supply quantity of a product transported in trip to ProductInTrip.Quantity
|
traverse( scope.GetProductInTripInOptimizerRun(), Elements, productintrip )
|
{
|
quantity := this.GetOptimalValue( program.TripNewSupplyVariables().Get( productintrip ) );
|
|
if ( quantity <= 0 )
|
{
|
quantity := 100;
|
quantity := 0.0;
|
}
|
if( not productintrip.HasUserQuantity() ) // has user flag will retain, while has feedback flag will be reset to optimizer flag.
|
{
|
productintrip.SetOptimizerQuantity( quantity );
|
}
|
}
|
*]
|
InterfaceProperties { Accessibility: 'Module' }
|
}
|