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

The “host” package

The “host” package contains the “EvacuationHost” class which is responsible for creating and hosting the evacuation simulation. The full functionality of this class is provided in DIVAs. The implementation of the evacuation host creates an “EvacuationSimulation” and binds it to the “EvacuationHost”.

Implementation Steps

  1. Inside the package “edu.utdallas.mavs.evacuation.simulation.host” create a class named “EvacuationHost” that extends the abstract class “Host” defined in the package “edu.utdallas.mavs.divas.core.host”.
  2. The “EvacuationHost” provides concrete implementations for the abstract method “createSimulation” which is responsible for creating an instance of the evacuation simulation and associating it with the evacuation host.

The full implementation of the class “EvacuationHost” is provided in the following code.

package edu.utdallas.mavs.evacuation.simulation.host;

import edu.utdallas.mavs.divas.core.host.Host;
import edu.utdallas.mavs.divas.mts.MTSClient;
import edu.utdallas.mavs.evacuation.simulation.sim.EvacuationSimulation;

 * This class describes a Host for simulations of evacuation scenarios.
public class EvacuationHost extends Host {
	protected void createSimulation(MTSClient client) {
		simulation = new EvacuationSimulation(client);