Quintiq file version 2.0
|
#parent: #root
|
Method InitConstraintsForOperationDependentDemandInPeriod_AddConstraint (
|
CapacityPlanningSuboptimizer_CapacityPlanningAlgorithm program,
|
const Period_MP ptperiod,
|
const Period_MP ddperiod,
|
const OperationInput input,
|
Real scalefactor_operationdemandqty_constddperiod,
|
Real scalefactor_partialoperationdemandqty_constddperiod,
|
Real scalefactor_rhs_constddperiod
|
) const
|
{
|
Description:
|
[*
|
A constraint to calculate the dependent demand quantity of an input per bucket.
|
Specially for dependent demand belonging to operation with pre-processing duration.
|
*]
|
TextBody:
|
[*
|
// constddperiod constraint UoM: input PISP UoM
|
constddperiod := program.OperationDependentDemandPeriodQtyConstraints().Find( input, ddperiod );
|
if( isnull( constddperiod ) )
|
{
|
constddperiod := program.OperationDependentDemandPeriodQtyConstraints().New( input, ddperiod );
|
constddperiod.Sense( '=' );
|
constddperiod.RHSValue( 0.0 * scalefactor_rhs_constddperiod );
|
|
// Term UoM: input PISP UoM
|
|
constddperiod.NewTerm( -1.0 * scalefactor_operationdemandqty_constddperiod, program.OperationDemandQtyVariables().Get( input, ddperiod ) );
|
}
|
|
constddperiod.NewTerm( 1.0 * scalefactor_partialoperationdemandqty_constddperiod, program.PartialOperationDemandQtyVariables().Get( input, ddperiod, ptperiod ) );
|
*]
|
InterfaceProperties { Accessibility: 'Module' }
|
}
|