yypsybs
2023-09-09 3cb5a54def670d97301f07170fcaad213bfc54f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Quintiq file version 2.0
#parent: #root
Constraint IsPlannedWithinMaxRequired
{
  #keys: '2[149260.0.377710133][149260.0.377710134]'
  ConstraintCondition:
  [*
    value := this.GetIsPlannedWithinMaxQuantity() and this.GetIsPlannedWithinMaxDuration();
    
    return value;
  *]
  ConstraintKind: 'Soft'
  ConstraintText:
  [*
    @ifexpr( this.InputType() = GlobalParameters_MP::GetCampaignTransitionsTypeQuantity(),  
                     Translations::MP_Campaign_ViolatesIsPlannedWithinMaxQuantity( this, this.MacroPlan().GlobalParameters_MP().NumberOfDecimals() ), 
                      Translations::MP_Campaign_ViolatesIsPlannedWithinMaxDuration( this ) )@
  *]
  Description: "Violated when the total production quantity assigned to a campaign exceeds campaign's MaxQuantity or when the total production duration of the campaign exceeds campaign's MaxDuration depeniding on th eselected input type."
}