getInstrumentation() public method

public getInstrumentation ( ) : string>.Dictionary
return string>.Dictionary
コード例 #1
0
        public void testMultiGoalProblem()
        {
            Map romaniaMap = new SimplifiedRoadMapOfPartOfRomania();
            Problem problem = new Problem(SimplifiedRoadMapOfPartOfRomania.ARAD,
                    MapFunctionFactory.getActionsFunction(romaniaMap),
                    MapFunctionFactory.getResultFunction(), new DualMapGoalTest(
                            SimplifiedRoadMapOfPartOfRomania.BUCHAREST,
                            SimplifiedRoadMapOfPartOfRomania.HIRSOVA),
                    new MapStepCostFunction(romaniaMap));

            Search search = new BreadthFirstSearch(new GraphSearch());

            SearchAgent agent = new SearchAgent(problem, search);
            Assert
                    .Equals(
                            "[Action[name==moveTo, location==Sibiu], Action[name==moveTo, location==Fagaras], Action[name==moveTo, location==Bucharest], Action[name==moveTo, location==Urziceni], Action[name==moveTo, location==Hirsova]]",
                            agent.getActions().ToString());
            Assert.Equals(5, agent.getActions().Count);
            Assert.Equals("14", agent.getInstrumentation()[
                    "nodesExpanded"]);
            Assert.Equals("1", agent.getInstrumentation()[
                    "queueSize"]);
            Assert.Equals("5", agent.getInstrumentation()[
                    "maxQueueSize"]);
        }