+1 (972) 883-2091
ECSS 4.220, 800 W Campbell Rd, Richardson, TX 75083–0688, US

The “EvacuationMain” class

The “edu.utdallas.mavs.evacuation.simulation.EvacuationMain” class contains the main method that is responsible for creating, initializing, and starting the evacuation simulation. Implementing the class is the final step in implementing the Evacuation Simulation module.

Implementation Steps

The “EvacuationMain” class contains the implementation of the “main” method that is responsible for creating, initializing, and starting the evacuation simulation. The implementation of this class initializes the configuration properties for log4j which can be used to dump useful data of the simulation to an external file for further analysis. The full implementation of this class is provided in the following code.

package edu.utdallas.mavs.evacuation.simulation;

import org.apache.log4j.PropertyConfigurator;

import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Stage;

import edu.utdallas.mavs.divas.core.spec.env.EnvSpecEnum;
import edu.utdallas.mavs.evacuation.simulation.config.EvacuationVisConfig;
import edu.utdallas.mavs.evacuation.simulation.guice.SimulationModule;
import edu.utdallas.mavs.evacuation.simulation.host.EvacuationHost;

 * Simulation of evacuation scenarios over DIVAs framework.
public class EvacuationMain
     * Simulation entry point.
     * @param args no arguments defined
    public static void main(String[] args)
        // reads configuration properties for log4j

        // disables java logging

        // Register custom configurations
        // Starts the simulation
        final Injector injector = Guice.createInjector(Stage.PRODUCTION, new SimulationModule());

After creating and implementing the “EvacuationMain” class, the simulation module should look like the following: