yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Quintiq file version 2.0
#parent: #root
Constraint IsPlannedWithinMaxRequired
{
  #keys: '2[146302.1.829397422][146302.1.829397423]'
  ConstraintCondition:
  [*
    // If transition does not have operation, not necessary to violate constraint
    return not this.HasOperation() or (this.GetIsPlannedWithinMaxQuantity() and this.GetIsPlannedWithinMaxDuration() )
  *]
  ConstraintKind: 'Soft'
  ConstraintText:
  [*
    @ifexpr( this.TransitionType_MP().InputType() = GlobalParameters_MP::GetCampaignTransitionsTypeQuantity(),  
                     Translations::MP_Transition_ViolatesIsPlannedWithinMaxQuantity( this, this.MacroPlan().GlobalParameters_MP().NumberOfDecimals() ), 
                      Translations::MP_Transition_ViolatesIsPlannedWithinMaxDuration( this ) )@
  *]
  Description: "Violated when the total production quantity assigned to a transition exceeds transition's MaxQuantity or when the total production duration of the transition exceeds transition's MaxDuration depeniding on th eselected input type."
}