[HN Gopher] OSRD: Open-Source Railway Designer
       ___________________________________________________________________
        
       OSRD: Open-Source Railway Designer
        
       Author : JNRowe
       Score  : 187 points
       Date   : 2024-06-20 00:21 UTC (22 hours ago)
        
 (HTM) web link (osrd.fr)
 (TXT) w3m dump (osrd.fr)
        
       | 999900000999 wrote:
       | Very cool!
       | 
       | How hard is it to use though for someone without a real technical
       | skill set ?
        
         | TylerE wrote:
         | This appears to be governement software for Serious People
         | doing Serious Work so I'm guessing... not very.
        
         | emersion wrote:
         | Shouldn't be too hard, the tool is designed to be intuitive.
         | That said, it may not be obvious how to use the planning part
         | of the tool if you're not familiar with trains.
         | 
         | The README contains instructions to start OSRD with docker-
         | compose, if you want to try it out. Would be nice to have a
         | public demo instance for sure!
        
       | devdao wrote:
       | Looking forward to enjoying simulations of existing train
       | networks
        
       | cbsmith wrote:
       | I know I don't understand the domain _at all_ , but I'm surprised
       | that in this day and age you'd want a distributed system to do
       | railway design. What aspect of the problem makes it unsuitable
       | for running in a single process?
        
         | solardev wrote:
         | Do you mean this?
         | https://osrd.fr/en/docs/explanation/containers-architecture/
         | 
         | Could it just be the skillset that government has to? Web devs
         | are a dime a dozen and you can probably find people to
         | maintain/incrementally upgrade parts of it in the future easier
         | than you could find an expert in some desktop GUI language
         | (like .NET or Swift) that would still work after a few years of
         | OS updates.
        
           | cbsmith wrote:
           | The web interface I get, but you can stand up a web interface
           | with a single process built with a web server & an embedded
           | database.
        
             | solardev wrote:
             | That's true. I don't know enough about their stack or use
             | case or users to comment any further though, so I'll
             | refrain from speculating.
        
         | p_l wrote:
         | EDIT2: https://osrd.fr/en/docs/reference/architecture/services/
         | describes it better than I did :)
         | 
         | EDIT: The goals of OSRD include realtime cooperation between
         | multiple entities, including timetabling and planning on short
         | term. Thus somewhat more complex application that is
         | "multiplayer".
         | 
         | Part of the issue is that desktop application delivery can be
         | troublesome, logistic wise (especially now with various cross-
         | platform environments dying off), so if you want to serve as
         | wide group as possible with minimal logistical hassle, web
         | might be the way.
         | 
         | Then you might end up building it multiprocess because it's not
         | like you have a monolith once you have complex browser-side
         | state...
        
         | emersion wrote:
         | The database needs to be shared between multiple actors:
         | several teams of multiple people working in different
         | companies. For instance, a team may be working on a single
         | project such as a new railway or a large timetable change.
         | Another example would be multiple freight companies requesting
         | new routes.
         | 
         | Additionally, the UI contains complicated elements such as
         | custom maps with the railway network and custom graphs to
         | visualize trains. There is a large ecosystem to implement this
         | kind of stuff via Web technologies. A webapp also removes the
         | need to distribute an installable binary on many different
         | platforms (some may be quite restricted due to company
         | policies) and many different machines (there are many users,
         | see above).
         | 
         | Note that the system uses a client-server architecture but
         | isn't really distributed.
        
           | cbsmith wrote:
           | > Note that the system uses a client-server architecture but
           | isn't really distributed.
           | 
           | Yeah, I kind of agree. The thing is, it's orchestrating
           | multiple containers to do the job. I can't figure out why you
           | couldn't just have one container.
        
             | emersion wrote:
             | Part of the answer is that some of these services need to
             | be scaled horizontally to be able to handle a significant
             | number of users (e.g. tile servers, the core server),
             | another part of the answer is architectural constraints
             | (e.g. the core server needs to keep quite a bit of per-
             | infrastructure data in RAM).
             | 
             | (Of course, it's completely possible to build a single
             | container which runs all of the services in parallel, but
             | then monitoring/scaling/availability/etc are more difficult
             | to handle.)
        
               | cbsmith wrote:
               | > (Of course, it's completely possible to build a single
               | container which runs all of the services in parallel, but
               | then monitoring/scaling/availability/etc are more
               | difficult to handle.)
               | 
               | Having done both, I'm always surprised when people say
               | that it is more difficult to handle running N-copies of
               | the same container than a heterogeneous set of
               | containers. Sure, at really large scale you can glean
               | efficiencies from it (which is why one might do it), but
               | there's a lot of complexity that comes with that.
        
             | p_l wrote:
             | Read the architectural description - it does mention why
             | and how.
        
               | cbsmith wrote:
               | Yeah, I read it. It says: "It is a multi-service
               | architecture where several software components interact
               | with each other. This choice was made to ensure the
               | modularity of the code and to guarantee the
               | exploitability of certain OSRD services by external
               | applications"
               | 
               | Modularity of code is a common explanation for using a
               | multi-service architecture, but it's not a particularly
               | strong one (services are just one way of modularizing
               | code). In terms of OSRD services being accessed by
               | external applications, it doesn't seem like that would
               | work particularly well, given the coupling between the
               | pieces. The only pieces that would make any sense to me
               | for outside applications to directly in would be the
               | PostgreSQL database... and if that were the plan, I'd
               | just host the whole thing in PostgreSQL.
        
               | p_l wrote:
               | If you read deeper, you'd find out that for example the
               | simulation engine is a separate (older?) system written
               | in Java that does have an API but does not implement
               | other components like designing the railroad system etc.
        
               | cbsmith wrote:
               | There you go! Now I get it. Thanks.
        
       | solardev wrote:
       | This looks like a serious tool for real professionals to use.
       | Cool! I wish they had some screenshots or videos of the process.
       | 
       | In the meantime, if anyone's looking for gamified railroad-
       | building (just for fun), check out:
       | 
       | https://store.steampowered.com/app/1124180/Rail_Route/
       | 
       | https://store.steampowered.com/app/1134710/NIMBY_Rails/
       | 
       | https://store.steampowered.com/app/503940/Railway_Empire/
       | 
       | Or several more: https://github.com/arcataroger/awesome-
       | engineering-games/tre...
        
         | denysvitali wrote:
         | Thanks for the links, I've just discovered Mashinky [1], which
         | looks like OpenTTD with amazing graphics. So cool!
         | 
         | [1]: https://store.steampowered.com/app/598960/Mashinky/
        
           | febusravenga wrote:
           | Oh no, I always envisioned and drewamed about 3d extension of
           | TTD like this. Someone finally did it. I'm doomed.
        
           | rob74 wrote:
           | Whoa... this game looks realistic at first glance, with
           | locomotives and carriages modeled on real-world counterparts,
           | but when watching the demo video, the railfan in me
           | immediately starts screaming "No! This is all _wrong_! " -
           | the track grades are much too steep, the curves much too
           | tight, and that one scene where two freight trains almost
           | collide and then one of them stops dead with a few meters
           | distance to the other one - that's not how it works! I mean,
           | of course you can build a less realistic simulation game, I
           | think in this case it's just the disconnect between the
           | extremely realistic-looking trains behaving in an extremely
           | unrealistic way that bothers me...
        
             | bionade24 wrote:
             | Transport Fever 2 has a strong modding community doing
             | virtual model railroading. There are plenty of mods
             | improving vehicle stock, physics and procedures.
             | 
             | https://steamcommunity.com/app/1066780/images/
             | 
             | https://www.transportfever.net/
        
               | solardev wrote:
               | That's really cool! Is it a deeper simulation than games
               | like Cities Skylines?
        
               | papertokyo wrote:
               | The gameplay is focused on logistics, so those aspects
               | have a lot more control. I particularly enjoy that in
               | conjunction with the model railway aesthetics.
               | 
               | - You build roads and railways, and stations for
               | passengers and cargo (road/rail/air/sea) - You set up
               | 'lines' to connect various stations, and you can specify
               | what and how much gets loaded/unloaded at every station
               | (or whether vehicles on that line stop there at all), and
               | how long vehicles should wait for their cargo - You buy
               | each vehicle and assign it to a line, and in the case of
               | trains you also buy each component e.g. locomotives,
               | passenger cars, stake cars, hoppers depending on what
               | your line needs to transport
               | 
               | The cities grow by themselves based on the passenger
               | transport links with other cities and the level of goods
               | supply. There's no zoning, building water pipes, schools,
               | or anything like that. Just the minutiae of getting
               | things from A to B via C to pick up some more things
               | destined for Y and Z.
        
             | brnt wrote:
             | That's what I liked about Transport Fever: grading track
             | correctly is important, hard, and expensive!
        
             | nkrisc wrote:
             | To be fair it describes itself as board game-like gameplay.
             | The visuals are pretty but it doesn't sound like it's
             | trying to be a simulator, very much a game first.
        
         | samsolomon wrote:
         | I'd highly recommend Railway Empire (and Railway Empire 2).
         | It's the spiritual successor to Sid Meyer's Railroads! With a
         | fair bit more content and features.
         | 
         | EDIT: Railway Empire 2 is actually on sale right now!
         | https://store.steampowered.com/app/1644320/Railway_Empire_2/
        
         | resolutebat wrote:
         | What, no Simutrans?
         | 
         | https://www.simutrans.com/en/
         | 
         | Don't be put off by the, uhh, legacy graphics and quirky UI,
         | like Dwarf Fortress it has the the depth of decades of
         | development (and the learning curve isn't _quite_ as
         | murderous).
        
       | sakjur wrote:
       | This tool was the subject of a FOSDEM talk this year, which is
       | available as a video on FOSDEM's website:
       | https://fosdem.org/2024/schedule/event/fosdem-2024-2052-open...
        
         | Eckter2 wrote:
         | If you're interested, there's actually several other team
         | members who made talks about different parts of the project in
         | the "railway and open transport" track
         | 
         | Bending geographic maps for enhanced railway space-time
         | diagrams: https://fosdem.org/2024/schedule/track/railways-and-
         | open-tra...
         | 
         | MARECO algorithm: how to drive a train using the least amount
         | of energy:
         | https://fosdem.org/2024/schedule/event/fosdem-2024-2650-mare...
         | 
         | Railway signaling: detecting conflicts in a complex world:
         | https://fosdem.org/2024/schedule/event/fosdem-2024-2665-rail...
         | 
         | And last year:
         | 
         | Automated short-term train planning in OSRD:
         | https://archive.fosdem.org/2023/schedule/event/rot_osrd/
         | 
         | OpenStreetMap, one geographic database to rule them all?:
         | https://archive.fosdem.org/2023/schedule/event/rot_osm/
        
       | rickdeckard wrote:
       | Kudos for the EU (and as often, also here: France!) for
       | supporting such initiatives to open up niche, often-invisible
       | areas of a market to create new grounds for innovation and
       | disruption!
       | 
       | It doesn't work out in all cases, but in areas where it does it
       | silently moves society forward!
        
         | fffrantz wrote:
         | Here in Europe , a lot of former public utilities companies and
         | the public sector in general has been really pushing niche OSS
         | and OpenData projects in Europe.
         | 
         | It's not always useful (rarely actually) for the average Joe,
         | but it's definitely cool to see them embracing OSS and
         | OpenData.
        
       | ur-whale wrote:
       | I would have felt a tad better if such tool had originated in
       | Switzerland rather than France.
       | 
       | The railway system in Switzerland is far, far more reliable, far
       | more central to the Swiss economy and proportionally (Switzerland
       | is smaller than France) services much more of the country in
       | terms of both geographical reach and service frequency.
       | 
       | But ... credit where credit is due, kudos indeed to the Frenchies
       | for building and open sourcing something like this, I would love
       | to see a video of it in use.
       | 
       | [EDIT]: I skimmed through the documentation, and I haven't found
       | anything pertaining to monte carlo simulation of a complex
       | railway system subject to external perturbations, as in: throw a
       | bunch of unexpected events (accidents, breakdowns, blockages,
       | late trains from a neighboring country entering the system,
       | etc...) and see how well the whole network's efficiency holds
       | under such disturbances. Maybe I am misunderstanding the purpose
       | of the system.
       | 
       | [EDIT 2]: OK, found something. Such a "how well does the network
       | do under perturbation" is not part of the feature set yet but
       | seemed to be in the cards. From [1], in section "Operations
       | studies / Planned features include", I read: "automated timetable
       | robustness assessment using stochastic simulation".
       | 
       | [1]https://osrd.fr/en/about/use-case/#%C3%A9tudes-dexploitation
        
         | arbfay wrote:
         | Seriously...
         | 
         | This is like not trusting the cooking book of an American chef
         | because America has poor food quality. Or British chef in
         | Britain.
         | 
         | Individuals' talents are not bound by their countries' failures
         | and successes.
         | 
         | And comparatively the French train network is excellent, and
         | faster than the Swiss network.
         | 
         | No, I'm not French at all.
        
           | ur-whale wrote:
           | > And comparatively the French train network is excellent
           | 
           | I don't think we're talking about the same country here.
           | 
           | Are you a regular user ?
           | 
           | "Comparatively" ?
           | 
           | Sure, if you compare it to the US train network or to
           | Uganda's ... "comparatively", you can always find something
           | to compare to that makes you look excellent.
        
             | sofixa wrote:
             | > I don't think we're talking about the same country here.
             | 
             | > Are you a regular user ?
             | 
             | Not OP, but I am. The French railway system suffers from a
             | few faults (like the fact that it's Paris first, or not
             | enough capacity on some routes, especially around popular
             | times like Friday afternoon), but is otherwise extremely
             | good. There's very fast coverage between all big cities
             | aligned to Paris (so Lille - Lyon - Marseille is super
             | fast, but mostly because they are destinations linked to
             | Paris); Marseille - Bordeaux is slow because it isn't
             | aligned to Paris, and has to pass through bad terrain in
             | the middle of nowhere).
             | 
             | In terms of coverage of % of the population with regional
             | or high speed rail, or hell, low cost low or high speed
             | rail, it's among the best in the world. It's only serious
             | challengers are Spain, Italy, Japan, China.
        
         | PetitPrince wrote:
         | There's a similar-but-different tool developed by SBB CFF
         | FFS[1], it's even mentioned in the documentation of OSRD[2].
         | Both tools operate at different scope, if we're to believe the
         | documentation (OSRD is micro, Netzgrafik is macro).
         | 
         | [1]: https://github.com/SchweizerischeBundesbahnen/netzgrafik-
         | edi...
         | 
         | [2]: https://osrd.fr/en/docs/explanation/netzgrafik-editor/
        
           | p_l wrote:
           | There are also similar, commercial closed source systems from
           | SISCOG[1][2]
           | 
           | [1] https://www.siscog.pt/en-gb/ [2]
           | https://www.siscog.pt/en-gb/products/#railnode
        
             | PetitPrince wrote:
             | OP wanted something developed by the Swiss railways company
             | though (but SISCOG seems to be used by the Dannish,
             | Finnish, Norwegian, Canadian and Catalonian railways).
        
         | javilovesmambo wrote:
         | You can put it on a different way, the Swiss have no use case
         | for such a software since everything is running fine. On the
         | other hand, the French need the solution and are more
         | experienced dealing with railway traffic problems.
        
       ___________________________________________________________________
       (page generated 2024-06-20 23:01 UTC)