crowdwalk/src/main/java/nodagumi/ananPJ/Scenario/DumpEvent.java
/**
     * generate Dump term for walking agents in individual gen rule format
     * in GenerationFile format.
     */
generate Dump term for walking agents in individual gen rule format
in GenerationFile format.
generate Dump term for walking agents in individual gen rule format in GenerationFile format .
private Term dumpRuleTermForWalkingAgents(SimTime currentTime,
                                              Term ruleList) {
	AgentHandler handler = getAgentHandler() ;
	HashMap<String, ArrayList<AgentBase>> agentTable =
	    new HashMap<String, ArrayList<AgentBase>>() ;
	for(AgentBase agent : handler.getWalkingAgentCollection()) {
            String ruleName = agent.getFactory().getRuleName() ;
	    if(!agentTable.containsKey(ruleName)) {
		agentTable.put(ruleName, new ArrayList<AgentBase>()) ;
	    }
	    agentTable.get(ruleName).add(agent) ;
	}
	for(String ruleName : agentTable.keySet()) {
            AgentFactoryConfig factoryConfig =
                handler.getAgentFactoryConfigByName(ruleName) ;
	    Term rule =
		dumpTermForAgentsInOneRule(factoryConfig,
                                           agentTable.get(ruleName),
                                           currentTime) ;
	    ruleList.addNth(rule) ;
	}
        return ruleList ;
    }
private Term dumpRuleTermForWalkingAgents ( SimTime currentTime , Term ruleList ) { AgentHandler handler = getAgentHandler ( ) ; HashMap < String , ArrayList < AgentBase > > agentTable = new HashMap < String , ArrayList < AgentBase > > ( ) ; for ( AgentBase agent : handler . getWalkingAgentCollection ( ) ) { String ruleName = agent . getFactory ( ) . getRuleName ( ) ; if ( ! agentTable . containsKey ( ruleName ) ) { agentTable . put ( ruleName , new ArrayList < AgentBase > ( ) ) ; } agentTable . get ( ruleName ) . add ( agent ) ; } for ( String ruleName : agentTable . keySet ( ) ) { AgentFactoryConfig factoryConfig = handler . getAgentFactoryConfigByName ( ruleName ) ; Term rule = dumpTermForAgentsInOneRule ( factoryConfig , agentTable . get ( ruleName ) , currentTime ) ; ruleList . addNth ( rule ) ; } return ruleList ; }
generate Dump term for walking agents in individual gen rule format
 in GenerationFile format.
generate Dump term for walking agents in individual gen rule format in GenerationFile format .
// collect agents by each rule // generate rules