Started by PJMack, March 26, 2022, 10:56:19 PM
0 Members and 2 Guests are viewing this topic.
Quote from: PJMack on March 26, 2022, 10:56:19 PMI am currently working on a PR to enable half height tunnels. I am also planning on a second PR to add basic restrictions and conditional costs to tunnels (see below)
QuoteThe first PR to enable half height tunnels is intended for car only road tunnels, narrow-boat tunnels, and light rail and tube tunnels. That last point is a bit tricky as per this post: https://forum.simutrans.com/index.php/topic,21146.0.html. If I were to include the changes to allow all way-types to have low bridges and tunnels and all vehicles to use the is_tall flag, would those changes be used. By default I would set all rail, narrow, maglev, and air vehicles "is_tall" flags to true. For routing of those way types, I would either require the control key pressed for routing under low bridges and/or have a flag in the way descriptor to allow routing under low bridges.
QuoteFor the second PR, I had noticed that a wealthy player could build a sub-sea tunnel in 1750, which is not that realistic. For this I plan on adding a flag to the tunnel descriptors to allow sub-sea tunnel building, as well as a second build price for when building under a water tile.
QuoteRegarding cut and cover. It could be implemented so, that a tunnel that is less that X levels deep, cannot be built under existing structures. X should be at least 2 (full height), and then the level of the building divided by some well chosen factor, to prevent digging shallow tunnels under skyscrapers.
Quote from: Vladki on March 27, 2022, 08:03:03 PMI would also add a per-depth-below-ground charge added to the build costs for more realistic pricing of cut-and-cover tunneling. It can also be taking under consideration restricting some types of tunnels from being built beneath public structures and/or add extra costs in doing so, as some tunnels types can interfere with the foundations of buildings and damage them without the proper precautions.
Quote from: Vladki on March 27, 2022, 08:03:03 PMI'm not sure about maglev. They seem to be not very high but may require higher clearance due to aerodynamics in high speed.
QuoteRegarding the ventilation, each tunnel type (and engine type) could have a defined max length. Of course this is not easy to check if the tunnel splits into complex underground network. This could be be checked when routing the vehicle through the tunnel, so that exceeding the allowed length of continuous tunnel ride will show as "no route". To allow "metro" operation, a stop that is connected with a stop on surface would count as ventilation point (tunnel exit and entry)
Quote from: Matthew on March 28, 2022, 09:46:23 PMI don't think any Extended pakset has maglev. So maybe just leave it as it is.
Quote from: PJMack on March 29, 2022, 02:39:13 AMI created a branch here https://github.com/PJMack/simutrans-extended/tree/half_height_tunnels_and_trains.
QuoteHalf height tunnels can be enabled in the pakset using the "half_height=1" line in the dat file. Narrowgauge and track have been added to the list where low clearance bridges can be used. For narrowgauge vehicles, the default is for not tall, however standard gauge rail vehicles are tall by default and "is_tall=0" would be needed for short rail vehicles. All standard gauge rail vehicles loaded from a previous version of makeobj-extended would load as if is_tall was set. This branch is actually a branch off of the pier_system branch as I needed some functions from that branch, so I have not created a PR to master as of yet.As for the pricing, I plan on having the build cost be the current base cost plus a charge for building under water plus a charge for each tile below ground level (or the sea floor) plus a charge for being beneath a building, plus a charge for being beneath a road. Any of those charges would be set-able per tunnel type and could be zero where necessary. I also plan on having the tunnel restrictions on depth below ground/sea floor, (maybe depth below sea level), and whether it is build-able below buildings or water tiles. I may also consider a flag to permit tunnels under a building, but adjacent to parellel tunnel beneath a way to be considered under the way. This would be to compensate for roads only being one tile for two way traffic but other ways needing two tiles.
QuoteAs for a minimum depth to tunnels below buildings, that is something to think and research about. I to remember see a documentary on the London Victoria line where a tube tunnel went through the basement to a department store, so I am not sure there is actually a minimal depth for tunneling beneath buildings.
QuoteI also should make a clarification to my previous post. Where I said "light rail" I had tram systems in mind (including grade separated tram systems).
Quote from: Sirius on March 29, 2022, 12:09:58 AMSorry, but pak128.britain-ex has maglevs
Quote from: Matthew on March 28, 2022, 09:46:23 PMBut you know that the game has no differentiation between open ocean and tiny ponds.
Quote from: Vladki on March 31, 2022, 08:38:26 PMRegarding the foundations - Amsterdam is imho quite special, as the soil there cannot hold much and you have to hit some solid base deeper.
QuoteAnyway, real world constraints for building tunnels seem to be very complex. It seems that it was not only money that prevented our ancestors from building channel tunnel, or gotthard basis tunnel 100 years ago. It could have been also the level of technology for geological survey, or other factors. Or just the logistics needed to get the digged stuff out of the way.
Quote- Price should be dependent on depth, increasing for a few (4-6 maybe more?) levels (deeper cut), then remaining constant (bored tunnel costs are not very dependent on depth). - Also the price should be balanced so that making the cut and leaving it open must be cheaper than the tunnel. - if the tunnel is very shallow (1 or 2 levels), there should not be anything above (cut will destroy everything, and bored tunnel will hit the foundations).- if the tunnel is deeper that that, it can be built underneath existing buildings, but at the full price of bored tunnel.
Quote- I still like the idea that high level buildings would force the tunnel go deeper. Just like you cannot build bridge over high level building.
Quote- if there is a way to find the height of nearest body of water (lake or river), then charge some extra for building under the groundwater table.
Quote- building tunnel under the sea level, could have extra charge
Quote from: PJMack on March 31, 2022, 10:04:04 PMThe defaults would be that tunnels are buildable below buildings and not buildable below sea level.
Quote from: Octavius on April 04, 2022, 07:15:54 PMOr construction time. Construction of the old Fréjus tunnel was expected to take up to 40 years. Fortunately, after 9 years Alfred Nobel invented dynamite, cutting construction time to just 13 years. And in Simutrans we have digital dynamite, so we can build anything in an instant.
Quote from: PJMack on April 07, 2022, 09:56:51 PMI have completed the PR for extended, though it may not be much use without a corresponding PR for pak128.Britain.
Quote from: PJMack on April 07, 2022, 09:56:51 PMFor cut-and-cover tunneling, the depth costs would be greater than or equivalent to digging a trench, sub_way_cost moderately low, subbuilding costs high (need to mess with foundation), subsea not allowed, and subwaterline only allowed once pumping technology develops.
QuoteFor bored tunnels, sub building costs would be low (just monitoring), subwaterline allowed when pumping technology develops, subsea allowed when tunneling shield technology develops, and no sub_way or depth costs.
Quote from: Matthew on April 08, 2022, 11:09:44 AMThis looks awesome! I never imagined that you would make so much progress so fast! As you say, there's plenty of pakset implementation and testing to do, but this looks like a complete new feature that perfectly fits the Extended vision.
Quote from: Matthew on April 08, 2022, 11:09:44 AMLooking at the changes to simtool.cc, it seems that trying to build a tunnel in an inappropriate location triggers NOTICE_TILE_FULL. I haven't studied that part of the code yet, but it looks like a generic error message. Do you plan to add specific error messages so that players are told why certain tunnel types cannot be built in certain tiles? If not, I would like to request this addition please, as an aid to new players.
Quote from: Octavius on April 08, 2022, 04:42:43 PMApart from pumps, you may need sheet pilings (or some precursor of those) driven into the ground before you start digging. Otherwise not only the flow of groundwater may be too high for your pumps to manage, but this flow of water will take sand along, causing subsidence and collapsing buildings in surrounding areas.
Quote from: Octavius on April 08, 2022, 04:42:43 PM1: If I design my tunnel such that water can flow out by gravity, I don't need pumps. For example, I could enter a mountain from the valley floor, going slightly up, and end up below the summit well below the groundwater table. Of course, this would require a somewhat more complex check of the tunnel's geometry.
Quote from: Octavius on April 08, 2022, 04:42:43 PM2: The tunnelling shield was meant to allow tunnelling through soft, wet soil. When tunnelling through hard rock, you don't need it (but we don't simulate geology to that level). Also, it doesn't really matter whether that river is straight above your head or just a bit to the side. But then, no 19th century tunnel builder would even consider boring a tunnel through soft, wet soil unless it was the intention to pass underneath a river.
Quote from: Octavius on April 08, 2022, 04:42:43 PMSpeaking of foundations, waterways have foundations too. About 15 metres for a modern ship canal.And in addition too allow_subsea (or actually under any water; sea, lake, river or canal), you may want a setting to require subsea. Immersed tunnels would have to be close to the surface and below water. They could be pretty cheap. If you think it's an exploit to build a canal, build a cheap immersed tunnel underneath, then destroy the canal, think again. This is actually done in real life.
Quote from: Octavius on April 04, 2022, 07:15:54 PMWould it be possible to later build a building on top of the cut-and-cover tunnel?
Quote from: Matthew on March 29, 2022, 07:18:19 PMThank you for the correction. How strange. The pakset sets so much store by realism and then it has an entirely fictional waytype.
Quote from: jamespetts on May 01, 2022, 03:53:33 PMFifthly, the overlap between the function of the tube tunnel way constraint and the half height tunnels is a problem. What needs to be done, I think, is remove the tube tunnel way constraint entirely and replace it with the new system (which is likely to necessitate allowing the half height tunnels to be built into full height slopes), because duplication between the two makes no sense.
Quote from: jamespetts on May 01, 2022, 03:53:33 PMFirst of all, the half height Tube tunnel entrances seem to have some graphical issues: see here for example:
Quote from: jamespetts on May 01, 2022, 03:53:33 PMSecondly, there seems to be an anomaly, in that Tube tunnels cannot be built into full height slopes. Was this intended? If so, what real life engineering constraint was this intended to simulate? This is likely to seem odd and anomalous to players.
Quote from: jamespetts on May 01, 2022, 03:53:33 PMFourthly, the subsurface tunnels seem both to represent half-height tunnels and cut-and-cover tunnels. In reality, cut-and-cover tunnels were built to all gauges: on the London Underground, it was the deep level, bored "Tube" tunnels that were built to a very restricted loading gauge. The cut-and-cover, subsurface tunnels (for the Metropolitan, Hammersmith & City, Circle and District lines) were built to more or less ordinary railway gauge (see here for an illustration), and full sized main line trains regularly used them until 1939. Thus, we need to separate the cut and cover restriction on building underneath the sea from the half height restriction.
Quote from: jamespetts on May 01, 2022, 03:53:33 PMFurther, one thing that is not clear from the tooltips is what the relationship is between the number of meters after the "sub sea permitted xxxm" and the "x tiles" depth. Without the "x tiles" depth, it seems as though the 500m (etc.) is actually a depth limit, but I suspect that it means something else; but what else is not clear. Did you implement a system to do a search from the tile to the nearest tunnel entrance or tunnel tile not underwater to simulate the need for ventilation? If so, it may be necessary to clarify this in the tooltips. Testing the length restriction algorithm itself, it seems to be based on how close that the tunnel actually gets to land (an option discussed above, I believe). I am not convinced that this accurately represents reality: I am not aware of any actual tunnels that had long horizontal ventilation shafts from land running parallel to them some kilometres away, and, even if this were possible, the cost of this would be gargantuan compared to ordinary ventilation shafts immediately above the tunnels; these costs would have to be simulated for this feature to balance properly. What I suggest instead is that the length be based instead on the number of tiles along the route of the tunnel to the nearest land tile under which the tunnel passes.
Quote from: jamespetts on May 02, 2022, 10:33:40 AMso it does not make sense to align the sub-surface tunnels with the Tube loading gauge rather than the main line loading gauge.
Quote from: jamespetts on May 02, 2022, 10:33:40 AMIn terms of subsea tunnelling distance, I have not looked at the code for checking distance to shore, but are you sure that it is much harder to use a way-finding system to find the nearest shore tile back along the length of the existing tunnel than to run an expansive search for all tiles in the vicinity? There is existing code used for, e.g., electrification that sets up a dummy vehicle and uses the built-in way-finding algorithm that could easily be re-used for this purpose
Quote from: jamespetts on May 02, 2022, 10:33:40 AMIt really is very anomalous and likely to be (1) incomprehensible to most players; and (2) giving rise to exploits and perverse incentives for tunnel distance from shore to be measured other than along the tunnel's own length.
Quote from: jamespetts on May 02, 2022, 10:33:40 AMIn terms of loading/structure gauge, the Metropolitan loading/structure gauge was much closer to the various main line loading gauges than either was to Tube gauge. In the pre-grouping era, as you will see from the web page that you linked, each individual railway company had its own bespoke loading/structure gauge, and that of the Metropolitan, although at the lower end of the spectrum in terms of height, is not of a wholly different order of smallness in the way that the Tube lines are. In fact, main line carriages did frequently run on the Metropolitan/District lines before 1939 - there was a service from Ealing Broadway to Southend via the District and a service from Southall/Uxbridge Vine Street to Liverpool Street via Paddington and the Metropolitan. The loading gauge of the carriages for the latter were slightly less than those of other GWR carriages, but they were not noticeably on a different scale to them in the way that trains for, e.g., the Bakerloo Line would be. We do not simulate all of the intricacies of slightly different loading gauges in Pak128.Britain-Ex, so it does not make sense to align the sub-surface tunnels with the Tube loading gauge rather than the main line loading gauge.
Quote from: Sirius on May 02, 2022, 01:01:03 PMAs "something in between", the light-rail loading gauge might be an option.However, that gauge is meant to represent the typical rectangual loading gauge shape of only 2.65m in width and up to ~3.70 in height.
Quote from: jamespetts on May 02, 2022, 10:33:40 AMIn terms of subsea tunnelling distance, I have not looked at the code for checking distance to shore, but are you sure that it is much harder to use a way-finding system to find the nearest shore tile back along the length of the existing tunnel than to run an expansive search for all tiles in the vicinity? There is existing code used for, e.g., electrification that sets up a dummy vehicle and uses the built-in way-finding algorithm that could easily be re-used for this purpose. It really is very anomalous and likely to be (1) incomprehensible to most players; and (2) giving rise to exploits and perverse incentives for tunnel distance from shore to be measured other than along the tunnel's own length.
Quote from: PJMack on May 03, 2022, 05:17:12 PMAlthough it is still somewhat anomalous, it is less anomalous that what it was. The goal with this was purely to prevent intercontinental tunnels. I am not saying the a more extravagant solution is not doable or undesirable, I just do not think it should be a priority at the moment. As far a player confusion, as long as "distance to shore limit" is somewhat clearly labeled, I do not think it will be a problem.
Quote from: PJMack on May 03, 2022, 05:17:12 PMI did look into the algorithmic complexity of using the existing path finding verses the extensive search and found the extensive search to likely run faster in most circumstances. The land contour map and water level map are stored in simple arrays which can be easily traversed in for loops maintaining a high cache hit rate and high level of accuracy from the branch prediction hardware. The underground way data is rather scattered in memory and traversing it involves several unpredictable conditional jumps, which would lead to plenty of cache misses and pipeline stalls. The existing code is also designed to only work with the existing route, and new code would need to be added to traverse the proposed route.
Quote from: prissi on May 04, 2022, 11:28:35 AMThe route search (find_route) for platforms can be easily used for finding tunnel entries as well, so that code could be reused. Just return true on a tunnel entry instead of a platform of the stop.