yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
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
Method GetCombiForExistingPlan (
  OptCampaignUnitSubPeriod ocusp
) as OptCampaignCombi
{
  Description: 'create method for getting a combi with properly set attributes for reflecting existing planned campaigns and transitions'
  TextBody:
  [*
    combi := ocusp.OptCampaignCombi( relnew ); 
    combi.IsSelectedByOptimizer( true ); 
    combi.IsBasedOnExistingPlan( true ); // we need this in some of the constraint formatting, because the existing plan combi can violate some of the assumptions 
                                         // for the cplex creation. For example see InitConstraintsForCampaignMinQtyMultiPeriod 
                                         // and remark that 
                                         // "Select the shortest multi period combi in order to set the constraint. Only for the shortest we need the min quantity, everything longer will not have min quantity"
    combi.IsCompleteCombi( true ); // so it will not be used by the recursive combi generation as start point
    return combi;
  *]
  InterfaceProperties { Accessibility: 'Module' }
}