src/com/simulator/elements/Generator.java
public void initialize() {

        for (TrafficFlow flow : listOfTrafficFlows) {
            List<Path> paths = NetworkState.getListOfPaths(vertex.getVertexID(), flow.getDstNode().getVertexID());
            flow.getListOfPaths().addAll(paths);
        }
        double interArrivalTime = requestDistribution.execute();
        Event event = new CircuitRequestEvent(new Entity(interArrivalTime), this, getRandomPort());
        Scheduler.schedule(event, interArrivalTime);
    }
/**
     * Function to initialize the generator and generate the first event
     */
Function to initialize the generator and generate the first event
Function to initialize the generator and generate the first event
public void initialize() {
        for (TrafficFlow flow : listOfTrafficFlows) {
            List<Path> paths = NetworkState.getListOfPaths(vertex.getVertexID(), flow.getDstNode().getVertexID());
            flow.getListOfPaths().addAll(paths);
        }
        double interArrivalTime = requestDistribution.execute();
        Event event = new CircuitRequestEvent(new Entity(interArrivalTime), this, getRandomPort());
        Scheduler.schedule(event, interArrivalTime);
    }
public void initialize ( ) { for ( TrafficFlow flow : listOfTrafficFlows ) { List < Path > paths = NetworkState . getListOfPaths ( vertex . getVertexID ( ) , flow . getDstNode ( ) . getVertexID ( ) ) ; flow . getListOfPaths ( ) . addAll ( paths ) ; } double interArrivalTime = requestDistribution . execute ( ) ; Event event = new CircuitRequestEvent ( new Entity ( interArrivalTime ) , this , getRandomPort ( ) ) ; Scheduler . schedule ( event , interArrivalTime ) ; }
Function to initialize the generator and generate the first event
Function to initialize the generator and generate the first event