예제 #1
0
 public OnDemandActionPlanningSchedulingStrategy(double period, ActionDirective action, LowLevelLayer lowLevel)
 {
     SceduelingPeriod = TimeSpan.FromSeconds(period);
     A              = action;
     lowLevelLayer  = lowLevel;
     newPlanRequest = false;
 }
예제 #2
0
        public TacticLayer(WorldModel worldModel, LowLevelLayer lowLevel)
        {
            actionSelectionStrategy = new FuzzyActionSelectionStrategy(worldModel);
            WM            = worldModel;
            lowLevelLayer = lowLevel;
            mLogger       = Logger.Logger.Instance;
            internalState = ModuleState.Inactive;
            Hashtable consts = WM.GetConstants();

            currentActionDirective = new ActionDirective(AHEntities.Action.LEAVE, DateTime.Now);
            //PlanningScheduler = new OnDemandActionPlanningSchedulingStrategy(0.02, currentActionDirective, lowLevel);
            PlanningScheduler = new PeriodicActionPlanningSchedulingStrategy((double)consts["PlanPeriod"], currentActionDirective, lowLevel);
        }