News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

bridgewater-brunel.me.uk - Simutrans-Experimental - Pak128.Britain-Ex 0.9.1

Started by jamespetts, January 26, 2014, 01:35:08 AM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

VOLVO

Quote from: AP on March 17, 2014, 11:01:55 PM
Are they still unprofitable?  :-[ I remember them being a total pain in the last online map, really difficult to make money, but was hoping that had been fixed.

As for slow, they are at least faster than sailing ships and post bikes  ;)
For a route with 50% or more tunnels, not a chance mate... (480quid for a km in maintenance...)
I will have to re-plan my network to see whether to continue the underground plan or use the overground strategy(but it's too hilly in the south).
I doubt even freight route will make profit (didn't try that though).
I've set up a local save file to test the profitability of the trains, even the overground part is struggling to make profit.
In the later days, electrification will probably help as EMUs are cheaper to run, but we shall see what will happen.
AEO's network is likely to be self-sustainable(just). (But will take ages to cover the actual building costs)


Quote from: ӔO on March 18, 2014, 12:49:07 AM
go into the main config directory and open up simuconf.tab with notepad or a similar word editing program.
In simuconf.tab, change "additional_client_frames_behind" to 19, this should help reduce desync considerably.
Thanks for the tips, now i can actually do something other than just staying connected..

Quote from: jamespetts on March 17, 2014, 11:16:24 PM
The issue raised about the number of towns and the size of the ocean is an interesting one. What really drives computational and memory load is transport infrastructure, and what, in turn, drives that are towns and industries. We could afford to have a larger map with larger land areas (and therefore the potential for longer journeys) if we had the same number of towns with much slower growth, and possibly even more industries, although care would have to be taken not to have too large an area of land based wilderness, which is not very realistic for the UK.

(Forgive the code box - this prevents a misinterpretation of my symbols as BBCode.

Perhaps, in a future map, have an equivalent of the Scottish highlands in the [i]middle[/i] of the map. In the following diagrams, take [L] to be lowlands, [H] to be highlands, [I] to be small islands and [S] to be sea. Something like this might work:
...
[L][L][L][H][H][L][L][L][L][/s][/i]
[/quote]
It certainly will make this a lot more difficult to play with. But making it difficult to play with is probably the key point to lower the CPU load...

Sarlock

I wonder how many more ships we can add to the map before the server completely seizes up...

We're almost at 6 million residents, and that growth happened in just 50 years.  There will likely be a population over 10 million by 1850, 15-20 million by 1900.  While trains may help in theory, with how TurfIt is reporting server load, adding 10-20+ vehicle trains may make the problem worse, given that most of the western size of the map isn't even served for pax/mail yet.  Some of the ships coming up in the next 50 years are single hold ships which will help tremendously in reducing this load.

James - can we consider making a quick addition to the pakset and create a single hold East Indiaman and brig for pax/mail?  Might want to do one for the Clipper too, since I plan to heavily upgrade to that in 1837.  I could probably convert at least 1000 (maybe even 1500) of my convoys over to this form, reducing vehicle count in the game by 8000-12000, which may have huge benefits.  Rather than releasing a whole new pakset version, we could just release that single .pak file and add it to our pakset folder and carry on playing.
Current projects: Pak128 Trees, blender graphics

AP

Quote from: VOLVO on March 18, 2014, 11:09:11 AM
For a route with 50% or more tunnels, not a chance mate... (480quid for a km in maintenance...)
Well I thought that at first. But tunnel maintenance isn't hugely more than normal track mainenance, and a single track route is only half the maintenance of a double track route. I think it comes down to intensity of operation, how much demand there is. It needs a moderately intense service I think, hence ensuring I had large settlements at both ends.

jamespetts

Making "quick updates" is actually not quick at all - every release involves a very great amount of overhead in preparation and ancillary work (especially as the next version of the pakset is already in progress, but is set up for half heights, which is only compatible with the next major release, which is not yet complete). The time would better be spent investigating a longer term solution to the issue of computational load taken by many multiple vehicle convoys waiting for a long time at stops, probably by altering the code rather than interfering with the pakset.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Sarlock

True, for a full release.  But it could be as simple as releasing a .pak file and posting the link in here to download so we can put in to our pak folders.  Only people using the server game would need it to keep their pak folder compatible.
Current projects: Pak128 Trees, blender graphics

jamespetts

If I understand the problem correctly (I am waiting for TurfIt to reply to my edit to the earlier message enquiring as to what function that he found took the high amount of processing power to confirm the position), the solution might well be as simple as calling the loading function one in every X steps rather than every step for convoys which have more than Y ticks of loading to do before they may leave or one in every Z steps for a convoy which is waiting for a full load and is more than N percent away from achieving that load.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

ӔO

We are at 4834 convoys now, but I reduced some excess holds on all lines, so maybe it balances out.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

TurfIt

I didn't time into halt->request_loading(self) called from convoi_t::laden() which is where all the CPU was going.  How are you handling the loading time? I presume when the convoi is waiting for its departure that it doesn't keep calling laden()... What are you doing with wait_lock? I notice upon game loading many convois with it being reset to the 60000 maximum, and from seemingly absurd values at times (3.5 hours). If the convois are loaded, and waiting to depart, and with the wait_lock set, they shouldn't be calling laden(). You need to look into if all the calls to laden() are legitimate, and if so, hopefully reduce the computation being done therein.

jamespetts

Hmm - this is quite complicated. Would you be able to break down the timing a little more? That would be particularly helpful. What I am finding is that laden() is not called constantly, but is called near the end of the loading time, and progressively more often as the departure time nears. It also calls halt->request_loading(self), which, in turn, calls hat_gelhalten() on all convoys currently in the stop. Large chunks of hat_gelhalten() are skipped when the convoy has not moved since the last time that it was called, however. It would thus be extremely useful to know where all the time is being spent among these methods.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

ӔO

server seems to have crashed or stalled

to add, the save game also seems to crash at around the 4h mark in April.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

jamespetts

Hmm - will have to investigate when I have more time. Thank you for the report.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

Quote from: ӔO on March 19, 2014, 03:22:50 AM
...the save game also seems to crash at around the 4h mark in April.

Hmm - I cannot get it to crash on my local debug copy in April, I am afraid, nor is it easy to deduce why the server came to a halt in what on the face of it seems like an infinite loop. I have restarted the server, and taken the opportunity to increase the server frames per second back to 5 to ease load (adjust your additional client frames behind to a multiple of 5 to get the best performance) and increased the months before an inactive player is unlocked to 360. Please let me know if anyone has any more insight into what caused this crash/freeze or whether anyone can reliably reproduce one.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

TurfIt

Quote from: jamespetts on March 19, 2014, 12:55:32 AM
It would thus be extremely useful to know where all the time is being spent among these methods.

haltestelle_t::hole_ab() is the culprit. Within it, 50% is being spent on the get_halt() call in the inner loop, and 25% spent handling the binaryheap.

The excessive number of waypoints in the schedules is resulting in far more loops and get_halt() calls than normal. The preponderance of docks is also forcing the get_halt() calls into a search.  Waypoints need to be detected some other way than get_halt().is_bound() which is far too costly in that inner loop.

The binaryheap being created/destroyed for every vehicle on every convoi that's loading is another area for improvement. It would really make sense to load by convoi than by vehicle, especially with ship holds artificially inflating the vehicle count.

Beyond hole_ab(), throughout the loading process there appear to be sections of code that would be better executed when a convoi first arrives at a stop, or leaves it. The time wasted performing the same calculation over and over during the loading is minimal compared to the hole_ab() problem, but fix that and they'll be more significant. It appears the purpose of laden() was misunderstood at some point - there's even a comment in there expressing surprise it's executed more than once when a vehicle hasn't moved...

There also appears to be some shenanigans with wait_lock. Haven't really looked at it yet, but besides excessive values at times (3.5hrs), the loading routines appear to be triggering more often than they should.

jamespetts

Thank you very much for your analysis - this is extremely helpful. I will look into this when I have some chance (currently working on calibrating passenger generation for the next major release).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Sarlock

Thank you for bringing the server back up... hopefully we can find what is causing it to hang.

Amazingly, I can connect from this hotel.  It takes nearly 10 minutes to download the map, however, so I am only connecting when there are no other players present... I'd hate to hang things for 10 minutes while I connect!  Connection is surprisingly stable, I've been able to stay on for a good 5 minutes a couple of times.

I tried a mock game on local here and in 1835 I am able to get a decent underground rail network going that is able to cover its construction and monthly operating cost.  One significant limitation that AP will run in to is that underground signals aren't available until the 1860's, so you'll have to run a looped double track system under the oceans if you want to run more than one train at a time (or set up empty stations to break things up-but this slows things down).
Current projects: Pak128 Trees, blender graphics

ӔO

I unwittingly stuck some ships after raising some land.
There are a few off of Brickingport and Emwich.

The server does not seem to handle rerouting of ships elegantly when new land is blocking its original route.
But mysteriously, the ship reroutes just fine most of the time, while extremely rarely ships will run aground. Running aground obviously causes a crash.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

VOLVO

Quote from: Sarlock on March 21, 2014, 04:42:53 AM
Thank you for bringing the server back up... hopefully we can find what is causing it to hang.

Amazingly, I can connect from this hotel.  It takes nearly 10 minutes to download the map, however, so I am only connecting when there are no other players present... I'd hate to hang things for 10 minutes while I connect!  Connection is surprisingly stable, I've been able to stay on for a good 5 minutes a couple of times.

I tried a mock game on local here and in 1835 I am able to get a decent underground rail network going that is able to cover its construction and monthly operating cost.  One significant limitation that AP will run in to is that underground signals aren't available until the 1860's, so you'll have to run a looped double track system under the oceans if you want to run more than one train at a time (or set up empty stations to break things up-but this slows things down).
Did you try to try to connect the interchange stations as well? As the line just couldn't barely cover the cost when I tried.
As for AP's problem.. It's something that I never think of, as I will have underground stations in the tunnel sections.
But that probably is the only option, as I really don't wanna see more causeways which kind of altered the landscape quite ridiculously.. :/

Milko

Hello

In this server you use holds of ships, but I remember that there was a problem with the "length" of the ship with the hols added (http://forum.simutrans.com/index.php?topic=12462.msg123235#msg123235). I see none of you encountered the problem, then the problem is solved?

Giuseppe

Sarlock

Can't say I've noticed this issue... I seem to be able to fill all 7 holds on ships without an issue, even at single tile docks.

VOLVO, I've connected a bit but for the most part the passengers generated on my eastern island create a lot of west-bound traffic.  Almost every coastal city on the eastern island is well served with a criss-cross of canals and shipping routes - there is several million passengers and mail created every year on the eastern side, more then enough to feed profits to the cross-map tunnel network.  With a similar network established for the western cities, there will be a lot of demand for the inter-island rail route -- likely more than it can handle until technology improves.  I think the reason it's profitable is because our map has so many passengers/population.  By 1835ish, there could be 20 million people on the map (if the server survives).

For the eastern cities, I plan to serve all of the cities that I am currently connecting through an underground tunnel/subway system looping around under the entire island.  I will continue serving local inter-city routes with the canal system - I've tested this and found that ships offer a very effective option compared to busses - they do not need to wait for road traffic, travel nearly as fast (faster when road traffic is accounted for), and have a much higher capacity (and therefore need far less convoys in motion than with early road vehicles).  They have a slightly longer wait time at each station but the passengers don't seem to care... and some selections can carry both mail and pax.
Current projects: Pak128 Trees, blender graphics

AP

Quote from: Sarlock on March 21, 2014, 04:42:53 AMOne significant limitation that AP will run in to is that underground signals aren't available until the 1860's, so you'll have to run a looped double track system under the oceans if you want to run more than one train at a time (or set up empty stations to break things up-but this slows things down).

I hadn't noticed that, but in offline testing I'm trying to figure out how much passenger demand there is (see other thread). There is less that i would have expected...may have to consider freight also.

Sarlock

There are certainly lots of opportunity to add freight to the line.  When testing, did you connect my entire network to your hub at Applelock?  Consider that we are still a few decades away from this network and by then the cities will have grown even more... there seems to be plenty of demand for profitable travels.  And, frankly, with interest income on your big cash balance, even if it's not profitable at the start you will still be cash positive.
Current projects: Pak128 Trees, blender graphics

ӔO

Since most of the line is single track, you can use the American trick of making really long trains to avoid clogging up the lines.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

Sarlock

Exactly what I did.  I am running 36 vehicle trains, using 4 LMR "Patentees" to pull a 688 pax/1200 mail train.  There was no science behind this configuration, I'm sure it could be improved upon (nearly doubled in length, basically, to reach 64), but it is doing the trick.  Seems to be profitable enough, if you're running 75% full or more most of the time.

Running steam trains in a purely underground application is a little weird, but it works...  ;)
Current projects: Pak128 Trees, blender graphics

VOLVO


ӔO

the metropolitan railway had a lot of ventilation holes and special steam engines until the advancement of electricity.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

AP

Quote from: ӔO on March 22, 2014, 12:29:38 AM
Since most of the line is single track, you can use the American trick of making really long trains to avoid clogging up the lines.

That was the plan for later - start with 6 tile trains, keep lengthening the trains and passing loops (and adding more loops) rather than doubling the entire network. There are many precedents for single-track main lines (and Spain is even talking about single-track high speed rail).

I'd rather keep freight on the seaways tbh, since it doesn't have the same speedbonuses that passengers do.

How do TPOs work, i assume it must give a loading time advantage for mail? Do I just use one per train?

ӔO

TPO gives a payment bonus for long distance mail. Loading times remain unchanged.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

AP

Quote from: ӔO on March 22, 2014, 11:42:31 AM
TPO gives a payment bonus for long distance mail. Loading times remain unchanged.
Do you use one per mail train, or do you get bigger bonuses the more you use?

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

ӔO

with a local save, I'm now down to 0.5x speed and the server also seems to be running a lot slower.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

VOLVO

Quote from: ӔO on March 24, 2014, 08:39:43 AM
with a local save, I'm now down to 0.5x speed and the server also seems to be running a lot slower.
No surprise when the number of vehicles has approached 5000...

Isaac Eiland-Hall

Sorry for offtopic, but you two gave me a heart attack. Some weird server problems, and in my timezone, your two comments were made at 02:39:43 and 02:49:23, which I misread as the same timestamp and thought there must be some problem where all posts on the forum were sharing a timestamp, since the one message quotes the other........... :-/ lol

Sarlock

I can still manage about 3-4x on my laptop, but it's a fairly fast machine.

I ran a local copy and removed a lot of ships (down to about 2000) and was able to get it back up to about 10x.

Running a huge underground railway system in 1836/37 on a local save, construction costs are about $80 million so far (and $3 million/month maintenance), but making about $5 million/month in profits, so it's certainly feasible.  You just have to make certain you have enough pax/mail on each side to run your trains at least half full.  A full train running between the two big islands is earning about $500,000/trip.
Current projects: Pak128 Trees, blender graphics

ӔO

in 1820, there will be a steamship that can carry 200pax/500mail and has a loading time of 40min/48min.

Replacing all the current pax/mail ships with that should reduce the load.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

jamespetts

I shall be very interested in reports of how the magical ship of 1820 makes a difference to server performance...
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.