org.lucci.madhoc.simulation
Class DgsDriver

java.lang.Object
  extended by org.lucci.madhoc.simulation.DgsDriver
All Implemented Interfaces:
SimulationListener

public class DgsDriver
extends java.lang.Object
implements SimulationListener

This class implements the SimulationListener interface and allow the creation of a DSG file. This file represents a dynamic graph that is resultant from the activity of the Madhoc simulator.

The class generates a gziped file

DGS file format

The DGS (Dynamic Graph Stream) file format stores information about dynamic graphs. This information is divided into canonical events that are edge/node modification insertion or deletion. Each event represents a line in the file. A set of modifications in the graph genereate such lines.

The time at witch the events occure can be controled with the notion of step. A step is another event in the file format. The time elapsed between 2 steps can be controled by the application.

Since:
20060616
Author:
Yoann Pigné

Constructor Summary
DgsDriver()
           
 
Method Summary
 void afterDataTransfer(MadhocSimulation arg0)
           
 void afterSensing(MadhocSimulation arg0)
           
 void afterStationsDo(MadhocSimulation arg0)
           
 void afterTheStationsMove(MadhocSimulation arg0)
           
 void beforeDataTransfer(MadhocSimulation arg0)
           
 void beforeSensing(MadhocSimulation arg0)
           
 void beforeStationsDo(MadhocSimulation arg0)
           
 void beforeTheStationsMove(MadhocSimulation arg0)
           
 void connectionsHaveAppeared(MadhocSimulation arg0, java.util.Collection<Connection> arg1)
           
 void connectionsHaveVanished(MadhocSimulation arg0, java.util.Collection<Connection> arg1)
           
 void iterationHasCompleted(Simulation arg0)
           
 void iterationStarting(Simulation arg0)
           
 void terminate()
          Close the fil before terminatng.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DgsDriver

public DgsDriver()
Method Detail

afterDataTransfer

public void afterDataTransfer(MadhocSimulation arg0)
Specified by:
afterDataTransfer in interface SimulationListener

afterSensing

public void afterSensing(MadhocSimulation arg0)
Specified by:
afterSensing in interface SimulationListener

afterStationsDo

public void afterStationsDo(MadhocSimulation arg0)
Specified by:
afterStationsDo in interface SimulationListener

afterTheStationsMove

public void afterTheStationsMove(MadhocSimulation arg0)
Specified by:
afterTheStationsMove in interface SimulationListener

beforeDataTransfer

public void beforeDataTransfer(MadhocSimulation arg0)
Specified by:
beforeDataTransfer in interface SimulationListener

beforeSensing

public void beforeSensing(MadhocSimulation arg0)
Specified by:
beforeSensing in interface SimulationListener

beforeStationsDo

public void beforeStationsDo(MadhocSimulation arg0)
Specified by:
beforeStationsDo in interface SimulationListener

beforeTheStationsMove

public void beforeTheStationsMove(MadhocSimulation arg0)
Specified by:
beforeTheStationsMove in interface SimulationListener

connectionsHaveAppeared

public void connectionsHaveAppeared(MadhocSimulation arg0,
                                    java.util.Collection<Connection> arg1)
Specified by:
connectionsHaveAppeared in interface SimulationListener

connectionsHaveVanished

public void connectionsHaveVanished(MadhocSimulation arg0,
                                    java.util.Collection<Connection> arg1)
Specified by:
connectionsHaveVanished in interface SimulationListener

iterationHasCompleted

public void iterationHasCompleted(Simulation arg0)
Specified by:
iterationHasCompleted in interface SimulationListener

iterationStarting

public void iterationStarting(Simulation arg0)
Specified by:
iterationStarting in interface SimulationListener

terminate

public void terminate()
Close the fil before terminatng.