1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  StaticMethod CanStartSmartPlan ( 
 |    ScenarioManager scenariomanager, 
 |    Scenario activescenario, 
 |    Boolean isactivescenariocounted, 
 |    Period_MPs periods, 
 |    output String feedback_o 
 |  ) declarative remote as Boolean 
 |  { 
 |    Description: 'Check whether smartplan can be called and run. Smart plan can only be run on planning periods.' 
 |    TextBody: 
 |    [* 
 |      isplanningperiod := forall( periods, Elements, period, period.IsPlanning() ) 
 |       
 |       
 |      if( not isplanningperiod ) 
 |      { 
 |        feedback_o := Translations::MP_MacroPlan_ActionOnlyAllowedOnPlanningPeriod(); 
 |      } 
 |      else 
 |      { 
 |        ScenarioManager::CanStartSmartPlan( scenariomanager, activescenario, isactivescenariocounted, feedback_o ); 
 |      } 
 |       
 |      return feedback_o = ''; 
 |    *] 
 |  } 
 |  
  |