Пример #1
0
        public ComplexHTNPlanner()
        {
            InitialState = new HTNState();
            TargetState = new HTNState();
            TaskNetwork = new HTNTaskNetwork();

            StateConstraints = new List<HTNState>();
            TaskSets = new List<HTNTaskSet>();
            AllocationDictionary = new Dictionary<string, string>();
            ResourceProfileSet = new ResourceProfileSet();
        }
Пример #2
0
        public HTNTaskNetwork(HTNTaskNetwork htnTaskNetwork)
            : this()
        {
            foreach (string key in htnTaskNetwork.PrimitiveTasks)
            {
                PrimitiveTasks.Add((string)key.Clone());
            }

            foreach (KeyValuePair<string, string> pv in htnTaskNetwork.HTNTasks)
            {
                string id = (string)pv.Key.Clone();
                string name = (string)pv.Value.Clone();
                HTNTasks.Add(id, name);
            }

            foreach (KeyValuePair<string, HTNTaskNetworkConstraints> pv in htnTaskNetwork.Constraints)
            {
                // TODO .....uh? Is this on purpose?
            }
        }
Пример #3
0
 public void AddATaskNetwork(string id, HTNTaskNetwork taskNetwork)
 {
     taskNetworks.Add(id, taskNetwork);
 }