public OnDemandActionPlanningSchedulingStrategy(double period, ActionDirective action, LowLevelLayer lowLevel) { SceduelingPeriod = TimeSpan.FromSeconds(period); A = action; lowLevelLayer = lowLevel; newPlanRequest = false; }
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); }