News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

Subsea Tunnels

Started by Matthew, April 17, 2022, 01:13:30 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Matthew

As part of his tunnels project, PJMack has kindly made a pull request making most tunnels in this pakset buildable "subsea". I think that this means that they can be built underneath sea tiles.

I am a little concerned about this. From a gameplay point of view, I don't want to see the maps turn into a race to build very long undersea tunnels (which we have seen in earlier B-B games, I believe). E.g. a tunnel between the East and West Continents of the current Bridgewater-Brunel map in the 19th century.

In my opinion, only the Channel_Tunnel and maybe RailTunnelHighSpeed should be buildable underneath sea tiles. Although the idea of a Channel Tunnel has been seriously discussed since Napoleonic times, I am not aware of any significant under-sea transport tunnels until the 1970s, inside or outside the UK. I think such a tunnel could have been built before June 1988 (the current intro date), because the real-life Channel Tunnel was built according to the 1975 plans, which were abandoned for financial rather than engineering reasons. But there is a big difference between the 1970s and the 1870s.

There are a couple of counter-examples. Firstly, the Severn Tunnel crossed underneath the Severn Estuary in the 1870s. This is not open sea and I think the leaks into the tunnel are fresh water. So you could say it's still a Large River in Simutrans terms. But it also looks a lot like riverine estuaries in B-B that are water tiles.

Secondly, the Kanmon Railway Tunnel was built under the Kanmon Strait in the late 1930s. The gap is only about 1.1km where the tunnel was built and you can walk the distance (using the pedestrian tunnel built in the 1950s). That is no wider than many rivers (the Yangtze is a kilometre across at Chongqing, over a thousand kilometres inland!). However, it is salt water open to the sea on both sides, so it would definitely be 9 water tiles wide in Simutrans. But it is only open to sea-going ships because of constant dredging (which reminds me of how Simutrans can see a channel of water tiles blocked off as the AI builds buildings!). This tunnel was a great achievement by Japanese engineers, but in my opinion it is comparable to the railway tunnels used by the London Underground or the New York Subway, not to the great undersea tunnels that you see from the 1970s, such as the Seikan Tunnel.

 I know it would be annoying not to be able to tunnel underneath small estuaries, but I just think the current PR will become an exploit.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

prissi

The 2nd Kammon is 3.4 km long and is 58 m below sea level. That is pretty much undersea. There is also the Hudson tunnel in New York from 1927, which is 23 m below sea level. I think that limited length undersea tunnels were feasible from the 1920ies.

PJMack

The MBTA blue line uses a 1904 tunnel under Boston Harbor.  The tunnel originally was 1 mile long (1.6km) and 820m of it underwater.  It cost $3 Million, and is cited to be the second underwater vehicle tunnel in North America and first underwater American subway.  It was designed for street cars, but later converted in the 20s to heavy rail (with narrow 9'3" wide cars only 43' long).

As to limiting tunnel length, that was discussed however the discussion did not resolve a practical method of doing so.  If a method can be found that is simple enough to code, algorithmically efficient, realistic, and intuitive to (new) players, then length limits would be reconsidered.

Matthew

Quote from: prissi on April 17, 2022, 08:50:50 AMThe 2nd Kammon is 3.4 km long and is 58 m below sea level. That is pretty much undersea. There is also the Hudson tunnel in New York from 1927, which is 23 m below sea level. I think that limited length undersea tunnels were feasible from the 1920ies.

Thank you for pointing these out. The second or Shin-Kanmon Tunnel was opened in 1975. Its depth supports my argument that the mid-1970s is the right time to introduce undersea tunnels.

You are right that the 1927 Holland Tunnel is a very interesting case. It is indeed 20 m below sea level. However, even at that depth, it was primarily built through the silt at the bottom of the river. Although the ventilation system was revolutionary, the tunneling was very similar to the rail tunnels built 1874-1904 (that is not a series of tunnels: the first pair took 30 years to complete). I guess this is more of an achievement than tunneling through bedrock, since the material was so soft. However, it is still a tunnel under a river. It still seems to be more like the tunnels under the Thames than today's undersea tunnels.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

jamespetts

This is an interesting discussion. I wonder whether as a result we need an additional mechanism to differentiate between different types of subsea tunnels. PJMack has noted that a length restriction is impractical (and I am not able to think of any algorithm that could make this workable), but one thing that would be much easier is to have a specific limit for the depth of the water tiles under which an undersea tunnel could be built.

One could use the existing subsea_tunnel datum for this, but instead of this being a boolean flag, it would represent a depth in tiles. 1 would be allow building only underneath the shallowest tile of sea (i.e., 1 tile below sea level), 2 at 2 tiles below sea level and so forth. This way, early subsea tunnels could be set to 1 to allow crossing estuaries, harbours, bays, etc., and much later subsea tunnels could be set to higher numbers to allow tunnelling underneath more substantial bodies of water, although still perhaps not the very deepest water, as nobody has ever built a tunnel underneath deep ocean - only relatively shallow seas on a continental shelf such as the English Channel.
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.

Sirius

Quote from: Matthew on April 17, 2022, 01:13:30 AMFrom a gameplay point of view, I don't want to see the maps turn into a race to build very long undersea tunnels

I agree with that concern. A realistic restriction is desirable but it should not be more restrictive than reality.
If that restriction means that we cannot build an underwater tunnel of ~7km length around the 1870s, then it might be better to not have such a restriction at all.
Same goes for 50km undersea tunnels around the 1970s

Which leads us to the most difficult question "What is a realistic restriction?"

The history of the channel tunnel dates back to the 19th century.
After a geological survey in 1866, construction of cross-Channel tunnel was considered feasible.

In the 1880s, exploration tunnels were started on both ends of the tunnel. The project was stopped for political reasons.
Another proposal came up around 1930. Again, it was stopped for politicalreasons.

In the end, it is very difficult to derive an introduction date of sub sea tunnels from that information, but it seems quite clear to me that is is not a good idea to have a strict magical date which suddenly allow us to  construct tunnels of any length underneath the ocean, where it was truly impossible to construct a 10km long tunnel underneath the ocean just one month ago.

Imho it's a good compromise address this issue with construction and maintenance costs from both, a realistic and gameplay perspective.
James suggestion might be sensible as well.

PJMack

I updated the PRs for restrictions on depth below water level for underwater tunnels.  The value for "sea_depth_limit" is the number of tiles below the surface of water for a tunnel beneath a water tile.  It is mutually exclusive to "depth_limit" so only one of those can be above zero.

prissi

The second Kammon tunnel at 58m depth is the street tunnel, and was started 1937, but then works delayed due to second world war. It was finished after the war and end of occupation in 1958. So 58m below sea was feasible in the 1930is.

Also the severn tunnel ceiling is 15m below the severn sea bed, which probably is also almost 20m below sea level.

Person0123452

I think the big problem in bringing "realism" to tunnels is that time and cost (specifically the timeframe in which an extrme tunnel would recoup it's own costs) are the main considerations in whether something is plausible in real life, rather than purely engineering constraints.

James notes that there haven't been any under ocean tunnels built in real life and I'm sure if a tunnel across the map took 300 ingame years to build, nobody would bother to do that either. But of course ingame, things build effectively instantly and people are potentially willing to sit around 100 years to see their investment repaid.

That being said, doing great, ridiculous megaprojects that would never be done in real life even though they potentially could, just so my company could say they did it, is something I find somewhat appealing in games like this. A tunnel across the entire map might be pushing it and maybe there should be some limits especially if it is wildly financially successful and impacts game balance but ultimately if something is at least in the realms of plausibility, people might just do it because they can and I don't necessarily think they should be stopped. Fundamentally as with most videogames that push realism to the limits, there's a point you hit where a player's motivations, contraints and pressure just aren't the same as they would be in the real world.

Again though, some limits may certainly not be a bad thing.

Octavius

Building a Channel Tunnel in the 1880s would have been highly optimistic (or an investment scam). You really need electric trains, electric drainage pumps, electric drills, good steel and decent concrete. By the 1930s it may have been technically feasible, but probably not economical in competition against ferries. But then, if you started construction in the 1880s, I don't think the tunnel would be ready before 1930.

The issue is that the limits on tunnel building are hard to simulate. Length is a problem. When the tunnel gets longer, more water leaks in and has to be pumped a longer distance to get it out again. The drainage pipe gets both longer and wider; the pumps must handle more flow and pressure while getting their power from farther away. There are similar issues for ventilation. And the longer the tunnel, the more likely it is that you cannot avoid difficult rock conditions. So cost increases faster than linear with length. Rock conditions under the Straight of Dover are very easy.

Maybe every tunnel tile could keep track of the distance to the nearest entry. The farther it is, the more expensive to build this tile. One could introduce access shafts. But how to calibrate this? One would need a sample of tunnels of varying length, bored at the same time, with the same technology and diameter and in the same rock conditions. For more than 8km, no such samples exist.

All of that only applies to bored tunnels.

jamespetts

Quote from: PJMack on April 19, 2022, 12:32:52 AMI updated the PRs for restrictions on depth below water level for underwater tunnels.  The value for "sea_depth_limit" is the number of tiles below the surface of water for a tunnel beneath a water tile.  It is mutually exclusive to "depth_limit" so only one of those can be above zero.
Thank you for that. Can I check: what happens if, in a pakset, both sea_depth_limit and depth_limit are specified; which takes precedence?

Also, can I clarify how the depth limit works; in areas of deep sea, does the limit prevent tunnels being built a short distance underneath the sea floor?

I note that some who have posted on this thread refer to it being possible to build a tunnel some distance beneath the sea bed (in shallow waters) in the 19th century, but that is quite different to being able to build a tunnel beneath a deep sea: the Severn estuary is not the English Channel, and the English Channel is not the Atlantic ocean.
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.

Matthew

There are many good points in this thread, so I will try to respond in a somewhat logical order. Sirius helpfully identified a good place to start:

Quote from: SiriusWhich leads us to the most difficult question "What is a realistic restriction?"

The history of the channel tunnel dates back to the 19th century.
After a geological survey in 1866, construction of cross-Channel tunnel was considered feasible.

In the 1880s, exploration tunnels were started on both ends of the tunnel. The project was stopped for political reasons.
Another proposal came up around 1930. Again, it was stopped for politicalreasons.

In the end, it is very difficult to derive an introduction date of sub sea tunnels from that information,

Yes, the 1880s Channel Tunnel project was stopped for political reasons, but that does not mean the engineering was feasible. As you say, those were exploration tunnels. I read a couple of contemporary articles (will try to upload here later in the week) and there did not seem to be a clear understanding of how difficult the ventilation issues would be, never mind how to solve them. So that suggests to me the engineering understanding was not there yet, as Octavius said:

Quote from: Octavius on April 19, 2022, 10:52:29 AMBuilding a Channel Tunnel in the 1880s would have been highly optimistic (or an investment scam). You really need electric trains, electric drainage pumps, electric drills, good steel and decent concrete. By the 1930s it may have been technically feasible, but probably not economical in competition against ferries. But then, if you started construction in the 1880s, I don't think the tunnel would be ready before 1930.

Yes, and this view is supported up by the experience of the Uptown Hudson Tubes in New York. Work started in 1874 but was not completed until 1904 because the engineering challenges repeatedly exceeded the budgets available. If the project had been feasible, I think the funding would have been found.

Quote from: OctaviusThe issue is that the limits on tunnel building are hard to simulate. Length is a problem. When the tunnel gets longer, more water leaks in and has to be pumped a longer distance to get it out again. The drainage pipe gets both longer and wider; the pumps must handle more flow and pressure while getting their power from farther away. There are similar issues for ventilation. And the longer the tunnel, the more likely it is that you cannot avoid difficult rock conditions. So cost increases faster than linear with length. Rock conditions under the Straight of Dover are very easy.

James and others have mentioned good points about depth. But after reading more, it does seem that the critical restraint on undersea tunnels is ventilation. Without ventilation shafts, fuel-burning vehicles will asphyxiate their passengers and crew. The roughly 'one kilometre tunnels' (Boston, Hudson, Kanmon, and Severn) were short enough that they did not need ventilation shafts in their underwater sections, because the gap between river banks/coasts were small enough to ventilate from land. A genuinely undersea tunnel needs to solve this problem as do sufficiently deep tunnels under land.

That's why the first deep-level Tube line, the City & South London Railway was statutorily forbidden from using steam, and intended to use cables (which Simutrans does not simulate) until electric locomotives became available (~1890).

The other approach is forced ventilation, invented for the 1920s Holland Tunnel (for road vehicles), which is also necessary for high-speed electrically-powered tunnels because of the need to dissipate heat. But note that while the tunnel is 2.5km, the distance between ventilation shafts is almost exactly one kilometre. So for ventilation purposes, it is really in the same class as the 'one kilometre tunnels'.

I guess it is theoretically possible to build ventilation shafts rising from the seabed to the surface but I am not aware that it has ever been done and I imagine that resisting the immense pressures of the sea would make it tantamount to building a series of artificial islands. In the case of the Holland Tunnel,  long piers were built out into the river from the banks, rather than having free-standing shafts.

Which makes me think....

Quote from: PJMack on April 17, 2022, 08:25:30 PMAs to limiting tunnel length, that was discussed however the discussion did not resolve a practical method of doing so.  If a method can be found that is simple enough to code, algorithmically efficient, realistic, and intuitive to (new) players, then length limits would be reconsidered.

Based on the points above, it seems to me that the critical factor is not so much the length of the tunnel as the distance from a land point where you can put a ventilation shaft. This seems to me to be easy to implement in code. Players can only build a tunnel tile if it is within a certain distance (set in the tunnel type's .dat) of a land tile. For example, to represent the 'one kilometre tunnels' that were feasible until the 1970s, the severn-tunnel type might have a limit of 500m = 4 tiles (so one kilometre total undersea length). I think that checking for ground vs water tiles only requires a 2D search, so that requires checking 25 tiles around each undersea tunnel tile (the check is not required for tunnel tiles under land). That must then be multiplied by the length of tunnel that the player is trying to build. If a player tries to build a 100-tile undersea tunnel then their client might freeze, but other clients and the server won't need to handle this, and players will quickly learn this is pointless because if construction fails, they would see an error message, such as:

Construction could not be completed. Undersea tunnels of this type must be built within 500 metres (4 tiles) of a land tile.
Does this suggestion meet the constraints that you have very sensibly set?

Quote from: PJMack on April 19, 2022, 12:32:52 AMI updated the PRs for restrictions on depth below water level for underwater tunnels.  The value for "sea_depth_limit" is the number of tiles below the surface of water for a tunnel beneath a water tile.  It is mutually exclusive to "depth_limit" so only one of those can be above zero.

I am aware that you have now made further changes to implement a different, depth-based system, and I appreciate and respect your swift response to the concerns discussed in this thread. But perhaps a distance-from-land-based system is a better reflection of the actual engineering constraints?

[There is an important issue here about electric vs fuel-based traction but I must go now! Will post again later in the week!]

Quote from: Sirius on April 18, 2022, 12:54:06 PMI agree with that concern. A realistic restriction is desirable but it should not be more restrictive than reality.
If that restriction means that we cannot build an underwater tunnel of ~7km length around the 1870s, then it might be better to not have such a restriction at all.
Same goes for 50km undersea tunnels around the 1970s

I hope the points above justify a tighter limit (one kilometre) in the 1870s. I am not yet sure what the limits of post-1970s construction are. I agree that the Channel Tunnel is not an absolute limit either way, both because the Strait of Dover have such favourable geology and because obviously the Chunnel might well have longer if the Strait was wider!  ;D

Quote from: OctaviusMaybe every tunnel tile could keep track of the distance to the nearest entry.

My suggestion is somewhat along these lines....

Quote from: Siriusbut it seems quite clear to me that is is not a good idea to have a strict magical date which suddenly allow us to  construct tunnels of any length underneath the ocean, where it was truly impossible to construct a 10km long tunnel underneath the ocean just one month ago.

This is how all technology works in Simutrans though, isn't it? Locomotives, tracks, bridges, city buildings, industries, all have introduction and obsolescence  dates.

Quote from: SiriusImho it's a good compromise address this issue with construction and maintenance costs from both, a realistic and gameplay perspective.
James suggestion might be sensible as well.

In my opinion, costs will not be effective in restraining exploits in the short or medium term. I am currently sitting on 300m¢ and when I tried building a tunnel across the current B-B ocean, it barely made a dent in that. James' long-term plan includes a proper capital & taxation structure which will make construction costs a real constraint, but they may not be implemented this decade.

(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

PJMack

As I realized that Immersion Tube Tunnels (ITTs) would need both the depth_limit and sea_depth_limit, I separated them so they can both be above zero. 

To clarify, for sea tiles the depth_limit is the limit below the sea floor whereas the sea_depth_limit is the limit below the water surface.  For land tiles, depth_limit is the limit below ground level.



As for referencing proposed tunnels, we need to keep in mind that there is a difference between what engineers thought was feasible and what actually was.  The first couple of attempt to build a tunnel under the Thames failed (see https://en.wikipedia.org/wiki/Thames_Tunnel#Construction).

jamespetts

Matthew's idea is an interesting one - but surely the sensible way to implement this would be to look for a land tile within x kilometres from the current tile along the length of the existing (or planned, for tunnels built by clicking and dragging multiple tiles at once) tunnel, rather than in all directions? It does not assist ventilation, after all, if there is some land on which a ventilation shaft could in theory be built a kilometre to the side of the tunnel. This is certainly a viable algorithm, and much easier and less computationally intensive than a two dimensional search in all directions.

More generally, ventilation based restrictions have been discussed before, but these are potentially complex. We perhaps need more detailed historical research to be sure that any given proposed set of restrictions will not produce arbitrary results or results that are significantly at odds with reality.
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.

PJMack

Matthew, our posts seam to have crossed paths.

Quote from: Matthew on April 19, 2022, 04:53:45 PMBased on the points above, it seems to me that the critical factor is not so much the length of the tunnel as the distance from a land point where you can put a ventilation shaft. This seems to me to be easy to implement in code. Players can only build a tunnel tile if it is within a certain distance (set in the tunnel type's .dat) of a land tile. For example, to represent the 'one kilometre tunnels' that were feasible until the 1970s, the severn-tunnel type might have a limit of 500m = 4 tiles (so one kilometre total undersea length). I think that checking for ground vs water tiles only requires a 2D search, so that requires checking 25 tiles around each undersea tunnel tile (the check is not required for tunnel tiles under land). That must then be multiplied by the length of tunnel that the player is trying to build. If a player tries to build a 100-tile undersea tunnel then their client might freeze, but other clients and the server won't need to handle this, and players will quickly learn this is pointless because if construction fails, they would see an error message, such as:

Code Select Expand
Construction could not be completed. Undersea tunnels of this type must be built within 500 metres (4 tiles) of a land tile.
Does this suggestion meet the constraints that you have very sensibly set?

This does seam sensible and meets most of the constraints.  There are a few issues that would need to be either addressed or determined to out-weight the benefits.  On the practicality and realism side, there is a question of what to do when a long tunnel is parallel to the shore line.  As far as error messages when routing of the tunnel, that would be major undertaking given the way the routing algorithms are currently written.  As for the algorithmic efficiency, though not ideal I think it would be efficient enough.

The idea behind using the depth is that on most maps, there is an approximate correlation between the water depth and distance to shore.  Your solution would not depend upon the map generator, so the question becomes whether or not the extra accuracy is worth the extra complexity?

Sirius

#15
Quote from: Matthew on April 19, 2022, 04:53:45 PMI hope the points above justify a tighter limit (one kilometre) in the 1870s.
I don't think so.
It is a concern to me that any (newly introduced) restrictions in simutrans-extended do not disallow the construction of objects that existed in the real-world.
The Severn tunnel is real. It is 7 km in length, roughly 3.6 km under water and was built in the 1870s.

If simutrans-extended simulates the ventilation system of that tunnel in detail, so it is possible to construct that tunnel on a real-world heightmap in its original place, but not in a place where it might not have been possible to build such a tunnel, then fine! Go for it!
If it doesn't, just don't be over-restrictive and generally permit construction of tunnels that are 7km long in total and 3.6 km under water.

Matthew

Quote from: Sirius on April 19, 2022, 06:16:57 PMI don't think so.
It is a concern to me that any (newly introduced) restrictions in simutrans-extended do not disallow the construction of objects that existed in the real-world.
The Severn tunnel is real. It is 7 km in length, roughly 3.6 km under water and was built in the 1870s.

If simutrans-extended simulates the ventilation system of that tunnel in detail, so it is possible to construct that tunnel on a real-world heightmap in its original place, but not in a place where it might not have been possible to build such a tunnel, then fine! Go for it!
If it doesn't, just don't be over-restrictive and generally permit construction of tunnels that are 7km long in total and 3.6 km under water.

I definitely agree that it should be possible to reproduce real-world tunnels in-game. Embarrassingly, I failed to realize you were talking about the Severn Tunnel when you mentioned 7 km. You are completely right that it should be possible to reproduce that tunnel in Simutrans. I was wrong to categorize it as a 'one kilometre' underwater tunnel.

Doing a bit more reading, it seems that the Severn Tunnel is ventilated by the tunnel portals (originally intakes, now outflows) and a single forced ventilation shaft on the Welsh riverbank (originally drawing air up, now forcing air down). The ventilation shaft is 4.26km from the nearest portal above ground, but there seems to be an "Air Driftway" (marked on this plan) at the bottom of the shaft to bring air slightly nearer to the centre of the tunnel, under the river. So that means it should be possible to build underwater severn_tunnel tiles up to 2km (16 tiles) from land, and perhaps a little further.

Quote from: PJMackAs for the algorithmic efficiency, though not ideal I think it would be efficient enough.

Quote from: jamespetts on April 19, 2022, 05:22:04 PMMatthew's idea is an interesting one - but surely the sensible way to implement this would be to look for a land tile within x kilometres from the current tile along the length of the existing (or planned, for tunnels built by clicking and dragging multiple tiles at once) tunnel, rather than in all directions? It does not assist ventilation, after all, if there is some land on which a ventilation shaft could in theory be built a kilometre to the side of the tunnel. This is certainly a viable algorithm, and much easier and less computationally intensive than a two dimensional search in all directions.

This makes sense for a linear tunnel and also addresses PJMack's point about tunnels running parallel to the riverbank/coast, which I had not considered at all. Unfortunately, players can and do build non-linear tunnel networks (underground junctions etc.). I do wonder whether three-way junctions would wreak havoc with the flow dynamics of tunnel ventilation (the fans at the Gotthard Base Tunnel must be completely turned off every time the lift to the surface runs, because this issue). But absent positive evidence for a prohibition, players should be able to make junctions underwater.

So would this require PJMack to implement the A* algorithm or something similar to trace all possible routes along the tunnel(s) until a land tile was reached? If so, that would significantly add to the complexity of the project, and requires creating a data structure of its own. When we were thinking of up to 1 km (25 tile checks per tunnel tile), I suspected the computational gains were not worth the trouble. However, for a 2km distance from land, we are now looking at a 16x16 or larger grid, which means checking 250 tiles per proposed tunnel tile, an order of magnitude higher, and far more computationally demanding. But maybe there is a simpler way of checking only tunnel squares.

Quote from: jamespettsMore generally, ventilation based restrictions have been discussed before, but these are potentially complex. We perhaps need more detailed historical research to be sure that any given proposed set of restrictions will not produce arbitrary results or results that are significantly at odds with reality.

Quote from: PJMack on April 19, 2022, 04:55:03 PMAs for referencing proposed tunnels, we need to keep in mind that there is a difference between what engineers thought was feasible and what actually was.  The first couple of attempt to build a tunnel under the Thames failed (see https://en.wikipedia.org/wiki/Thames_Tunnel#Construction).

Two good points. The accident-prone histories of the Severn Tunnel and Uptown Hudson Tubes show that the engineers were proceeding on a trial-and-error basis. When construction began, they didn't fully understand the geology they would encounter or the solutions they would use to overcome it. We can't replicate that situation, but we shouldn't allow players scientific knowledge until it was gained in the real-life timeline either.

Quote from: PJMack on April 19, 2022, 05:30:55 PMMatthew, our posts seam to have crossed paths.

Yes, it seems that the forum doesn't notify us about this any more.

QuoteAs far as error messages when routing of the tunnel, that would be major undertaking given the way the routing algorithms are currently written.

I don't understand this, so I probably need to study the relevant code.

QuoteThe idea behind using the depth is that on most maps, there is an approximate correlation between the water depth and distance to shore.  Your solution would not depend upon the map generator, so the question becomes whether or not the extra accuracy is worth the extra complexity?

There is of course no expectation that you will volunteer your time coding a distance-based system, when you have already kindly implemented a depth-based system, unless someone can convince you that it's necessary. But so far it does seem to me that the key real-life constraint is distance to ventilation shafts, not tunnel depth.

And I am not sure whether depth always correlates closely with distance in Extended maps. I know that Phystam likes to produce maps of Pacific island chains which often have quite shallow water. I will try to check later in the week.

I am also aware that I haven't thought through the implications of fuel-based vs electric traction, but I need to go do some work!
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Sirius

Quote from: Matthew on April 19, 2022, 08:37:35 PMSo would this require PJMack to implement the A* algorithm or something similar to trace all possible routes along the tunnel(s) until a land tile was reached? If so,
Simple depth-first search should be totally fine, which is insignificantly more difficult than iterating a linear tunnel.

PJMack

For algorithmic complexity, the terrain data is in a pair of 2D arrays, whereas tunnel and way information is rather scattered.  I believe the method of using linear distance (or Manhattan distance) to the shore may be more algorithmically efficient.  Traversing both the proposed and existing tunnels would be a major undertaking whereas Linear distance to shore would be simple to implement.

DrSuperGood

Long ago a suggestion was to have ventilation shafts for tunnels. Real life tunnels are limited by a combination of ventilation and safety requirements. The idea was that tunnels could only extend a finite distance from a tunnel entrance (which provides ventilation) or ventilation shaft that extends to the surface.

Underground systems for cities could place surface based ventilation shafts as well as use terrain cuttings with entrances to extend their range. Though use of shafts it would be possible to have land based tunnel networks extend hundreds of kilometres under built up cities. Undersea tunnels would be entirely limited by the ventilation provided from the tunnel entrances and exits since it is not possible to build surface ventilation shafts on water.

This would give potential cost balancing tools for different types of tunnel and tunnel entrance. For example channel tunnel could cost a lot more but support longer distances between entrances than usual subway tunnels. Cheaper tunnels for going through small hills on the surface might have very short tunnel length support.

To prevent mixing and matching entrances and tunnels each type of tunnel could have a ventilation requirement. For example channel tunnel entrances only provide ventilation for channel tunnel tiles and not for subway or underground railway tiles so is not a super vent in those situations. Cheaper short distance tunnels might not support any ventilation extension, a constraint that can let them be cheaper than more flexible tunnels.

Logically this can apply to all kinds of tunnel such as roads, rail and ship.

Octavius

#20
Quote from: Matthew on April 19, 2022, 04:53:45 PMJames and others have mentioned good points about depth. But after reading more, it does seem that the critical restraint on undersea tunnels is ventilation. Without ventilation shafts, fuel-burning vehicles will asphyxiate their passengers and crew. The roughly 'one kilometre tunnels' (Boston, Hudson, Kanmon, and Severn) were short enough that they did not need ventilation shafts in their underwater sections, because the gap between river banks/coasts were small enough to ventilate from land. A genuinely undersea tunnel needs to solve this problem as do sufficiently deep tunnels under land.
Ventilation can be an issue, but for the 2–20km railway tunnels it may be more about drainage. The Gotthard Tunnel, 15km long, was built at the same time as the Severn Tunnel and, despite not being under water, has no ventilation shafts. Forced ventilation was only added in 1899. I'm not saying that the air in the tunnel was particularly healthy. The Severn Tunnel indeed has a ventilation shaft, but the main reason why that shaft was constructed was to house the drainage pumps; ventilation was a bonus. With 1870s technology, those pumps had to be housed in a shaft leading to the lowest point of the tunnel. The Gotthard Tunnel needs no drainage pumps, as it's drained by gravity.

Car taffic in the 1920s was particularly dirty, producing a lot of carbon monoxide, so ventilation shafts were needed on tunnels of no more than a kilometre or so. Nowadays, the Norwegians have many road tunnels of 5–25km with rather limited ventilation: just some fans on the ceiling; the longest tunnels may have a few shafts. It helps that Norwegian traffic isn't very dense and that modern cars are cleaner. Electric cars seem to be quite common in Norway.

jamespetts

Thank you all for your suggestions. We do seem to have some conflicting information about ventilation requirements. Does anyone have any clearer information as to the actual nature of the constraints operating on tunnel length, depth and relationship to overhead bodies of water through the ages? I suspect that we may well get it wrong if we guess.
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.

PJMack

In Western Massachusetts, there is an in use 40km long 1933 tunnel with no ventilation at all.  Likewise the worlds longest tunnel, 127km long built in the 1940s, also has no ventilation.  The tunnel usage: drinking water.  This first is the Quabbin Aqueduct and the second the Delaware Aqueduct.  Though those are extreme cases, it does illustrate that ventilation is highly dependent on what the tunnel is used for.

Even if the use is well defined, ventilation is complicated.  In some cases for mountain tunnels, the difference in pressure on either side of the mountain provides enough air flow that no additional ventilation is needed.  In other case, the piston effect of vehicles are enough.  There are also cases where passive ventilation is sufficient for normal operation, but fire codes require emergency fan systems.  For long tunnels with access to vertical pipes, there may be large ventilation shafts above the ceiling or below the floor with powerful fans at each end.

As in the other thread, I suspect the conclusion to this discussion would be that ventilation based length limits would be too complicated, not only for coding, but for players to understand.

For depth restrictions, as sub-sea tunnel shields often need to be pressurized, the limit would likely be in the understanding of decompression sickness and how to mitigate it.  Even in modern times, there comes a point where time in a decompression chamber would be unreasonable.

Other than ventilation, length would also be limited by construction time.  This begs the question as to how to define how long of a construction project is too long.

Ranran(Hibernating)

The Kanmon Tunnel was electrified from the beginning due to ventilation problems even though the surrounding area was not electrified in the old days. Therefore, the passage of steam locomotives is prohibited.
It is strange that steam locomotives can pass through long undersea tunnels in the old days.
There were many unfortunate deaths of crew members due to the smoke of steam locomotives in a long tunnel in the mountains...
(´・ω・`)シミュトランスのアップデート履歴(日本語) (※更新停止中)
bit.ly/3AuKHHP

Octavius

Quote from: jamespetts on April 20, 2022, 04:28:09 PMI suspect that we may well get it wrong if we guess.
I suspect we're all guessing now.
Quote from: PJMack on April 20, 2022, 06:01:05 PMAs in the other thread, I suspect the conclusion to this discussion would be that ventilation based length limits would be too complicated, not only for coding, but for players to understand.
Very true.

Insufficient ventilation doesn't make it technically impossible to build a long tunnel, but it limits the amount of traffic passing through, making it impossible to effectively use the tunnel. You could run steam trains through the Channel Tunnel without any powered ventilation, as long as you run less than 10 trains per day per direction. Even less if health regulations are stricter than on the Gotthard line in 1895.

The whole tunnelling cost is so dependent on factors that aren't simulated in Simutrans-Extended, that making it all realistic is quite impossible without building in those factors too. That would require a geological model, a hydrological model, a model of the airflow in tunnels and a model of the pollution produced by vehicles. While the pollution level in the tunnel is too high, no convoy can reserve the way. That's probably too much to ask of our coders.

PJMack

Other ventilation factors include time spent in the tunnel (Humans can handle short term exposure to fumes) and how much power the engine is exerting.  Even with the same engine, a fast moving passenger train with momentum can handle a longer tunnel than a struggling slow moving freight train.



I did create the simple length to shore limit ("length_limit" in the dat file) which is the length in meters from shore that a tunnel can be built.  I only began to experience lagging in the extreme case of building a long 8km tunnel 20km away from shore with a length limit of 30000m.  Between this and the depth limit, this should allow pakset designers the options needed for preventing long tunnels between continents that could throw off balance.

For pak128.Britain-Ex, I set the length limits with a large margin to what I could find in reality.  I reduced the narrowgauge tunnels to half height, changed the parameters (and graphics) to the light rail tunnel to be a half height with cut-and-cover pricing.  I also created half height heavy rail tunnels for the district and metropolitan lines (also cut-and-cover) changing adjusting the rolling stock accordingly.  I had to estimate the price based in in-game prices of the other tunnel types.

For the changes to graphics, I again overestimated my artistic abilities and would not be insulted if someone else where to volunteer to redo some if it.  I did reuse some graphics, and it appears I am not the first one to do so.

I believe the coding PR is complete and ready for merging.  If the graphics and balance for the pakset PR is acceptable, then it is ready as well.

Matthew

I said that I would post an example of one of Phystam's maps. Here is the Solomon Islands map that was a popular server last year:



I can't figure out a way to accurately determine undersea height from a savegame, but you can see that all the sea is displayed with shallow graphics. I believe this map was generated from a heightmap. Being able to prevent people connecting distant islands with tunnels might be desirable on a map like this.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

PJMack

Quote from: Matthew on April 27, 2022, 01:55:23 AMI said that I would post an example of one of Phystam's maps. Here is the Solomon Islands map that was a popular server last year:



I can't figure out a way to accurately determine undersea height from a savegame, but you can see that all the sea is displayed with shallow graphics. I believe this map was generated from a heightmap. Being able to prevent people connecting distant islands with tunnels might be desirable on a map like this.

In that case, adding the simple length limit was the right call.  I should note however that both the new and previous elevated way systems allowed building upon shallow water, so a map with entirely shallow water would have an exploit for long viaducts anyway.  Also, the Brooklyn-Battery tunnel has a ventilation building at its midway point in the water.

jamespetts

The Brooklyn-Battery tunnel mechanic could readily be replicated by players by reclaiming some land in the middle of the tunnel. This is possible (but expensive) in shallow water.
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.