The International Simutrans Forum

 

Author Topic: network graph of a game.  (Read 9013 times)

0 Members and 1 Guest are viewing this topic.

Offline sdog

  • Devotee
  • *
  • Posts: 2039
network graph of a game.
« on: December 10, 2010, 10:11:13 PM »
Here's a reason to play experimental instead of standard ;-)
1927.svg, no lables


Black lines are rail, blue boats and red 'buses. Bold is the express line, of rouhly 300 km. Solid are fast commuter lines, roughly 100 km long. Dashed are local lines, and Doted are slow local single track lines (with autocoaches)

Experimental allows high interconnection with lines running parallel or having shortcuts. In standard there would be majore unbalance, with all passengers suddenly running on one of the lines, leaving the other empty.


It's from a game on an average sized map (500km*250km), 300 cities, 500k total population. Scale is 4 tiles per km. Since i'm playing with debug on, i can't handle large maps. It was started in 1900.
« Last Edit: December 17, 2010, 01:36:05 AM by sdog »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18493
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: network graph of a game.
« Reply #1 on: December 10, 2010, 10:49:27 PM »
This looks interesting! Can you upload a saved game for perusal?

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: network graph of a game.
« Reply #2 on: December 10, 2010, 10:52:59 PM »
later, gtg, it needs some caveats (no caveats, after inkleyad's patch for reverse route is implemented in 9.x branch i forgot, it should be already for a week or two :-)


140.sve
takes the latest build of pak128-britain-ex and your 9.x branch.


update:
141.sve sve incompatible to 9.x
1928 and without labels
« Last Edit: January 07, 2011, 08:34:36 AM by sdog »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18493
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: network graph of a game.
« Reply #3 on: December 13, 2010, 12:09:26 AM »
That is a fascinating network! That is rather the sort of thing that I had in mind when developing Experimental and Pak128.Britain-Ex in the first place: the subtleties of different grades of routes, etc., are far closer to reality than one is incentivised to create in a Standard game.

A question or two, though: why no 'bus networks in peripherally railway connected towns such as St. Helens and Spalding? And also - why do no 'buses stop at Shrewsbury City 10 stop?

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: network graph of a game.
« Reply #4 on: December 13, 2010, 12:30:47 AM »
i set up bus networks in all towns in a region in one go, after setting up the rail links. The spalding link is pretty new. (haven't really connected Manchester yet either.

I forgot to reroute bus line 13 in shrewsbury to City 10 stop, after i moved it.

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: network graph of a game.
« Reply #5 on: December 17, 2010, 01:34:04 AM »

146.sve incompatible to 9.x
The network graph starts to reflect the actual layout of the map. Before some other line pulled up the Bristol branches from the south it was even better. Perhaps if i reinforce the link to the other southern lines, it will become clearer again.

btw, the graphs are done with graphviz, wich is a quite powerful tool for graphs.
« Last Edit: January 07, 2011, 08:34:00 AM by sdog »

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: network graph of a game.
« Reply #6 on: December 17, 2010, 05:18:41 AM »
btw, the graphs are done with graphviz, wich is a quite powerful tool for graphs.
I don't think you write graph source by hand. Do you patched "export network graph" into simutrans code?

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: network graph of a game.
« Reply #7 on: December 17, 2010, 11:05:33 PM »
i'm afraid, no.

i was considering to do something, but didn't consider it important enough. when i started the graph i wanted to see only a few lines, and it soon got out of hand. (it's only a few entries every time i set up a line, no comparison to the chore of setting up the local bus lines.)

reducing the lines in the graph to the ones that matter would make the export a bit difficult. However by using clusters it could be feasible to use all lines and stops.  I only have one node per city and only entered additional intra city stops as exception, if they are also connected to inter-city routes.

Do you think there's demand for such network graphs? Having such an output shouldn't be too difficult.

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: network graph of a game.
« Reply #8 on: December 18, 2010, 11:10:52 AM »
I think it would be nice to be able to export such a file.
I'm getting confused by my own network and I think being able to see your entire network connectivity at one go would be much simpler than trying to sort through all the major connections with "show schedule" enabled on the mini map.
« Last Edit: December 18, 2010, 11:15:25 AM by AEO »

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: network graph of a game.
« Reply #9 on: December 18, 2010, 12:44:45 PM »
But graphviz file format is somewhat exotic. It is better export to GraphML.yEd is more user-frendly then .dot specification/compiler.

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: network graph of a game.
« Reply #10 on: December 18, 2010, 05:03:15 PM »
graphviz has the huge advantage of very good latex integration. With dot2tex you can even put it dirrectly in your latex sourcecode. But that's of course not a concern here. (.dot files are also very easy to write directly.)

But both is not a concern here anyways. And it doesn't matter since:
gxl2gv,gv2gxl − GXL-GV converter

A problem closer at hand is, regardless of the implementation, how to do the filtering of the data? Using the full set of line data might cause quite unreadable graphs. So either unimportant lines have to be filtered out, or some hierarchy or clustering introduced, likely with a much higher weight for those connections.

In both cases those notes must be identified. Reading the list of city names and grepping them in the station list to identify nodes to be clustered? (what to do with factories that could be far outside cities, but share the name) Reading the coordinates? (using them as fixed coords in the graph [boring graphs]; calculate distance between nodes and calculating distances [scales with 2**n, doesn't it? -- impossible to do directly])

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: network graph of a game.
« Reply #11 on: December 28, 2010, 09:33:14 AM »
here's a version compatible to simutrans-experimental 9.0 and pak britain ex 7.1 (james was so nice to convert it)

The network graph might be inconsistent with the game in some details: 1947.svg

152.sve
Quite often the trains on the reverse (corotating) branch of line 3 get lost after loading, and go on the counterrotating track. They can be sent back by graping them after they are clear of Shrewsbury Printing Station and setting their schedule to this station. (The waypoint for this station is on the corotating track, while the other waypoints are on the counterrotating track.) Reverse line code for circular lines can be quite tricky to use sometimes, since the trains have to calculate a way to the platform on the other track. This way is not used, since the train will call at the other platform and recalculate the route, but it has to be physically there still.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18493
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: network graph of a game.
« Reply #12 on: December 28, 2010, 12:10:11 PM »
It's fascinating to see how your game develops over time! I've just spent a long time looking at that. As I've mentioned before, I think, I'd be fascinated to see how your game develops with the increase of private car use: if you could connect the towns together with good quality roads using the public service player, that'd be a good way of testing.

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: network graph of a game.
« Reply #13 on: December 28, 2010, 05:52:48 PM »
best way to see it should be jumping a few decades into the future, so towns can't grow and neither will the network built. But i have to replace vehicles with those that will not have obsolescence costs then, else this effect would likely obscure the car ownership effect.

But then the increased requirement for speed boni will also interfere.


Right now the increase of car ownership, it's at  6% already, was not noticeable at all, since population grows much faster.

I thought the savegame was set to "everything is connected" should it matter if the towns are connected with good roads?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18493
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: network graph of a game.
« Reply #14 on: December 28, 2010, 07:25:07 PM »
SDog,

hmm: checking your saved game, you don't have it set to "assume_everywhere_connected_by_road", so you will need road connexions in order to check this. There's no need to fast forward, etc.:what I'm interested in is the impact of this feature on normal play (I've already tested it in an artificial setup). At 6%, especially with the current poor road connexions, I don't suppose that you will notice much of a difference, but I'd be interested to see whether, by the time that you get to the 1960s or 1970s (in the ordinary course of your game), having put in good quality road connexions as the public service player, you see any difference.

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: network graph of a game.
« Reply #15 on: December 28, 2010, 08:34:07 PM »
Just checking population growth. At least it doesn't look  exponential. Seems like linear growth with 100k per decade.
Code: [Select]
1948 786
1943 735
1940 693
1937 670
1927 585
1923 574
1917 562
1900 550

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18493
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: network graph of a game.
« Reply #16 on: December 28, 2010, 09:04:24 PM »
I think that I increased the journey time tolerances too much for the last release, such that a higher proportion of passengers are transported than I had envisaged. Reducing the tolerances will reduce the proportion of passengers transported, and thus reduce the rate of population growth. One reason why growth might have seemed great recently is because, in Pak128.Britain in the 1930s and 1940s there are mostly only very low density suburban houses that can be built.

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: network graph of a game.
« Reply #17 on: December 28, 2010, 10:12:20 PM »
i've interconnected most of the cities with good roads. Car ownership is at 9%, i've let it run for a year, but don't notice any change in passenger numbers.
153.sve


The increasing growth rate in the graph above is mostly due to more cities being connected. Since 1930 most of the population is connected to the network, so the rate doesn't increase a lot anymore. On first glance it might look exponential, but when looking on a logscale, it isn't. Seems to be linear growth after the 30s. This growth rate is quite ok.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18493
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: network graph of a game.
« Reply #18 on: December 28, 2010, 10:18:25 PM »
SDog,

thank you very much for the testing. I don't imagine that you'd notice much at 9%, either: it wasn't really until the late 1950s that, in real life, cars had a noticeable impact on railway travel. If you keep developing your game as normal (with the roads connected) and report back your findings (and upload saved games periodically), I'd be very grateful. I do always find it fascinating looking at your save files! Thank you very much for your help with this.

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: network graph of a game.
« Reply #19 on: December 29, 2010, 09:38:51 PM »
1955
After the nationalisation of the railway companies into the Shropshire and British Railways i've completely replaced most of the rolling stock with modern vehicles. Only Pannier Tank Autotrains remain of the old stock. I also greatly increased the capacity of the express line.

156.sve
network

« Last Edit: December 29, 2010, 09:43:08 PM by sdog »

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: network graph of a game.
« Reply #20 on: January 06, 2011, 12:20:13 AM »
It's 1962 and Shropshire and British Railways is steaming into the slightly less glorious (and smelly) age of diesel. Most notable is a connection north of Shropshire to connect Doncaster and Wolverhampton with a fast line. Almost all towns are connected to the network now. If you find an un-connected town in the western part of the map, let me know.

162.sve
1962.svg



The game was saved with simutrans-experimental 9.2 and a recent compile of pak-128.britain-ex. It should run as well with the release version 7.1 of the pak, this was only briefly tested however.

Offline wlindley us

  • Devotee
  • *
  • Posts: 960
    • Hacking for fun and profit since 1977
  • Languages: EN, DE
Re: network graph of a game.
« Reply #21 on: January 17, 2011, 01:57:04 PM »
Is there a concise guide to the .sve format?  I would love to write a little Perl program to generate all sorts of graphs, charts, return-on-investment guides, and even a Prospectus for investors, hehe!

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18493
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: network graph of a game.
« Reply #22 on: January 17, 2011, 03:18:09 PM »
The .sve format is rather byzantine, I'm afraid, and changes substantially with every version increment: the only way to look into it would be to look into the Simutrans source code itself.

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: network graph of a game.
« Reply #23 on: February 06, 2012, 07:33:24 AM »
i've revived this game, not with the latest savegame, but somewhere in-between.

In autumn 1961 he first deltic is sent on it's way, while a aerodynamical Class 8P is waiting at a signal behind to enter Shrewsbury Station. After unloading it is being retired. On the opposite track a BR 8P is leaving the station, those will be in service a few years longer, until eventually also get phased out in favour of the Deltic, if it proves it's worth instead of the older 8Ps. There are also several Standard 5MP of the line to Wolverhampton visible. Those are getting old too, but no suitable replacement has been found yet, as their track is not rated for the heavier diesel engines.