private void initialiseGrid() {
        int N           = (int)(double)network.params.get("N");
        int M           = (int)(double)network.params.get("M");
        IndividualNetworkAgent[][] vertices = new IndividualNetworkAgent[N][M];
        
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                IndividualNetworkAgent v = new IndividualNetworkAgent( network.getNewNodeId() );
                Location loc             = new Location(v.getName(), i, j, LocationType.XY);
                v.setLocation(loc);
                network.addVertex(  v );
                vertices[i][j] = v;
            }
        }
        
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < N; j++) {
                IndividualNetworkAgent vij0 = vertices[i][j];
                if (i < (N-1)) {
                    IndividualNetworkAgent vij1 = vertices[i+1][j];
                    Edge e = new Edge(vij0, vij1);
                    network.addEdge( e, vij0, vij1);
                }
                if (j < (N-1)) {
                    IndividualNetworkAgent vij1 = vertices[i][j+1];
                    Edge e = new Edge(vij0, vij1);
                    network.addEdge( e, vij0, vij1);
                }
            }
        }
        
        
    }