Quintiq file version 2.0
|
#parent: #root
|
MethodOverride UpdateRHSForPeriodTasksNotInScope (
|
MPConstraint minconst,
|
MPConstraint maxconst,
|
const RunContextForCapacityPlanning runcontext,
|
const LibOpt_Scope scope,
|
const CapacityPlanningSuboptimizer subopt,
|
Real scalefactor_rhs_minconst,
|
Real scalefactor_rhs_maxconst
|
) const
|
{
|
TextBody:
|
[*
|
//Update the RHS based on the trips outside the optimizer horizon
|
traverse( this, PeriodTask_MP.astype( PeriodTaskLaneLeg ), ptll )
|
{
|
traverse( ptll, Trip.ProductInTrip, pit,
|
not scope.Contains( pit.ProductInTripInOptimizerRun() )
|
and ( pit.HasRegularProductForOptimizer() or pit.Product_MP().GetIsInOptimizerRun( runcontext.IsPostProcessing() ) ) )
|
{
|
// The quantity of this product in trip that is outside the horizon
|
fixedquantity := pit.QuantityInProcessUOM();
|
newrhsminconst := subopt.GetConstraintRHS( minconst, scalefactor_rhs_minconst ) - fixedquantity;
|
minconst.RHSValue( newrhsminconst * scalefactor_rhs_minconst );
|
|
newrhsmaxconst := subopt.GetConstraintRHS( maxconst, scalefactor_rhs_maxconst ) - fixedquantity;
|
maxconst.RHSValue( newrhsmaxconst * scalefactor_rhs_minconst );
|
}
|
}
|
|
traverse( this, ChildOfUnitDimension, childunitperiod )
|
{
|
childunitperiod.UpdateRHSForPeriodTasksNotInScope( minconst, maxconst, runcontext, scope, subopt, scalefactor_rhs_minconst, scalefactor_rhs_maxconst );
|
}
|
*]
|
}
|