Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method Operation 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    optcampaign := this.OptCampaign(); 
 | 
    if( isnull( optcampaign ) ) 
 | 
    { 
 | 
      optcampaign := this.OptCampaign(  relnew );                                                         
 | 
    } 
 | 
    macroplan := this.Optimization().MacroPlan(); 
 | 
    run := macroplan.GetLastAlgorithmRun() 
 | 
     
 | 
    isdebug := exists( this, OptCampaign.OptCampaignUnit.OptCampaignUnitSubPeriod.OptCampaignCombi, combi, true, combi.DebugIsFixedPlanned() );  
 | 
    run.RunWithDebugCampaignCombis( isdebug );  
 | 
    if ( not isdebug )  
 | 
    { 
 | 
      debuginfo(  'Generating campaign combis' );  
 | 
     
 | 
      optcampaign.GenerateCombis( run.PeriodFirstStart(), run.PeriodLastEnd(), true ); 
 | 
      optcampaign.InitializeActiveStatusCombis();  
 | 
      debuginfo(  ' Total nr combis = ', counter( optcampaign, OptCampaignUnit.OptCampaignUnitSubPeriod.OptCampaignCombi, combi, true, true ) );  
 | 
    } 
 | 
    else 
 | 
    { 
 | 
      debuginfo(  'Debugmode re-using existing combis' );  
 | 
    } 
 | 
  *] 
 | 
} 
 |