cairnsh / roadnetwork

Road network simulator
0 stars 0 forks source link

Feature: Gathering statistics #1

Open cairnsh opened 7 years ago

cairnsh commented 7 years ago

The model should gather statistics about:

cairnsh commented 7 years ago

I forgot this but it already gathers information about line lengths and writes them to the file len.dat. The n-th entry is the total length of lines added at step n.

at82 commented 7 years ago

So we can easily make a histogram of length× √N

at82 commented 7 years ago

Is the n-th entry the total length of lines added up to step n? Which means the length for the line added at step n is the n-th entry minus the (n-1)-th entry?

cairnsh commented 7 years ago

No, I think it's the sum of the lengths of the line or lines added at step n (there might be more than one) This is the part that makes the file:

        dist,shortest = netx.bidirectional_dijkstra(self.componentgraph, "x", "y")
        self.llengths.write("%f\n" % dist)
        self.llengths.flush()