Page 1 of 39
Project: cargodest
Posted: 23 Aug 2008 10:13
by Celestar
Peter1138 and I have decided to finally tackle the challenge of integrating a fast and network-safe "Routing system" (commonly known as paxdest) into openttd and we have made quite some progress. I'm not going to copy-paste the wiki, so we just have one link here
Please note that this has a new dependency for compiling (not running) and it's not yet tested on all platforms (the most common ones will work however).
For more information, installation, known problems, etc. see. READ THIS! (and also the discussion page)
http://wiki.openttd.org/wiki/index.php/ ... stinations
Please report all problems / ideas to the wiki and refrain from using the forums. It's much easier to keep track. I'll open a section in the bug tracker at some point, but it's too early now imho
It would also be helpful if some of you would do some work on the wiki once you got used to it
Celestar
Re: Project: cargodest
Posted: 23 Aug 2008 11:29
by SergeS
What about windows binary ? can someone compile ?
Re: Project: cargodest
Posted: 23 Aug 2008 13:46
by Roujin
[shameless plug]
If anyone's interested in a few screenshots, here's a screenshot thread from my game using the cargodest branch:
http://www.tt-forums.net/viewtopic.php?f=47&t=38860
[/shameless plug]
Nice work Celestar (and peter

), go on like this

Re: Project: cargodest
Posted: 23 Aug 2008 16:58
by cmoiromain
yay!
this is just great! if you could provide a win32 build for us to try it out, it would be really nice. Else I will simply wait to try it out. But from reading the wiki, it seems pretty well done...
A small question though about the rout view in the minimap: does that mean vehcile routes are implemented too, or does this use the "nexthop" system? I am asking this because I see some lines going directly from one station to another further away, where no rout exists without passing through another station...
thanks for all the hard work you put into the marvellous features!
Re: Project: cargodest
Posted: 23 Aug 2008 17:02
by Zephyris
Wow, nice stuff!
Re: Project: cargodest
Posted: 23 Aug 2008 17:47
by fabca2
incredible news! I'm so happy
just a question did you use/took a look for ideas or concepts from previous (dead) paxpatch attempts, these was nice idea ?
I ll wait for a win32 bin to check that.
having tram, YAPP and Paxdest empty my personal wish list, so thank you very much.
Best Regards.
Re: Project: cargodest
Posted: 23 Aug 2008 18:45
by prissi
A quick glance indicated, that is mostly based on the last (number three) paxdest patch (from the behaviour). It looks more or less similar to the routing system simutrans uses. (My old number two patch was more simple, but had been more OpenTTD by taking into account intermediate stops kept the number of passengers generated at a station constant, and might have been faster. But it had less sophisticated selection of routes.)
But now they are going for the full way, which would give a more realistic number of passengers in the long range and will have the potential - in principle - to get rid of all the unload, transfer and so on orders. It will be interesting, how it will work in later games, since OpenTTD not really have (yet) an second loop for slower things, but certainly currently it is too early to comment on that.
Good luck. I would really have like to bring my old paxdest up to date to compare, but time did not permit it.
Re: Project: cargodest
Posted: 23 Aug 2008 18:58
by CommanderZ
OpenTTD not really have (yet) an second loop for slower things, but certainly currently it is too early to comment on that.
You can perform code daily (every n days)/monthly/yearly...
Re: Project: cargodest
Posted: 23 Aug 2008 19:10
by prissi
Yes, but it would still slow down update, as the number three paxdest did every day ... But as I said, it is not finished. I am just curious how the performance hit will be avoided.
Re: Project: cargodest
Posted: 23 Aug 2008 21:17
by Sacro
Don't post on the wiki, yet report all problems ideas to the wiki...

Re: Project: cargodest
Posted: 23 Aug 2008 21:45
by cmoiromain
I have a question: is the 'passengers can walk X tiles' that existed in a previous paxdest patch implemented? I guess not, since I read nowhere about it. But then do you believe it is feasible (only for passengers, since that would be pretty weird for cargo to move on their own...). Maybe they could be made able to 'walk' only within the catchment area of the station, meaning a station could take passengers from a nearby station as it would with an industry.
Re: Project: cargodest
Posted: 23 Aug 2008 21:50
by fabca2
a question :
what's the maximum depth of the tree ? (in other words : what the max of transfert station of a trip, how many hop ?)
Re: Project: cargodest
Posted: 23 Aug 2008 22:41
by Eddi
i don't think there's a maximum, as the route network uses a generic graph library.
Re: Project: cargodest
Posted: 24 Aug 2008 03:43
by Celestar
SergeS wrote:What about windows binary ? can someone compile ?
I don't really have access to a Windows box, let alone one that has a dev system on it, so someone else will need to do it. Sorry
cmoiromain wrote:A small question though about the rout view in the minimap: does that mean vehcile routes are implemented too, or does this use the "nexthop" system? I am asking this because I see some lines going directly from one station to another further away, where no rout exists without passing through another station...
Routes are implemented based on the vehicle orders. Everything is based on the vehicle orders, hence the non-compliance with the non-non-stop orders. No idea how to solve this yet. Maybe with an autofill feature for the orders or something.
fabca2 wrote:just a question did you use/took a look for ideas or concepts from previous (dead) paxpatch attempts, these was nice idea ?
I think all the paxdest patches are somehow related, but I started completely from scratch with a don't-try-to-reimplement-the-wheel approach.
prissi wrote:But now they are going for the full way, which would give a more realistic number of passengers in the long range and will have the potential - in principle - to get rid of all the unload, transfer and so on orders.
While Unload/Full Load/NoLoad is actually compatible with cargodest, Transfer orders make no sense whatsoever and are completely ignored.
prissi wrote:Yes, but it would still slow down update, as the number three paxdest did every day ... But as I said, it is not finished. I am just curious how the performance hit will be avoided.
Apart from the very-large-station problem, for which I have a fix (which still needs completion, review and testing) there is hardly any performance hit. In the profiling, you hardly see a difference between cargodest and clean trunk for a 300 or 400 vehicle game.
Sacro wrote:Don't post on the wiki, yet report all problems ideas to the wiki...
Er sorry, corrected that one mistake
cmoiromain wrote:I have a question: is the 'passengers can walk X tiles' that existed in a previous paxdest patch implemented?
No, because one of the nice things about cargodest is that you can actually implement local transportation in cities/towns. I even think the extended catchment areas of the larger station types are not needed with cargodest, but thinking about a new catchment system is also beyond this.
fabca2 wrote:a question :
what's the maximum depth of the tree ? (in other words : what the max of transfert station of a trip, how many hop ?)
Eddi is right. There is no limit on tree depth, neither in display (might come later) nor in the system itself.
Celestar
Re: Project: cargodest
Posted: 24 Aug 2008 06:57
by peter1138
cmoiromain wrote:A small question though about the rout view in the minimap: does that mean vehcile routes are implemented too, or does this use the "nexthop" system? I am asking this because I see some lines going directly from one station to another further away, where no rout exists without passing through another station...
Celestar wrote:Routes are implemented based on the vehicle orders. Everything is based on the vehicle orders, hence the non-compliance with the non-non-stop orders. No idea how to solve this yet. Maybe with an autofill feature for the orders or something.
For autofill, so far I'm thinking of 'soft' orders, with some kind of time-decreasing usage counter. For this, if lots of vehicles pass through and stop at a station it will appear in the order list. The order system will ignore these soft orders except for using it in the routing system. If vehicles no longer pass through the station, the counter will reduce to zero and eventually the soft order is removed. Possibly.
fabca2 wrote:just a question did you use/took a look for ideas or concepts from previous (dead) paxpatch attempts, these was nice idea ?
Celestar wrote:I think all the paxdest patches are somehow related, but I started completely from scratch with a don't-try-to-reimplement-the-wheel approach.
The smallmap route view was directly adapted from the last paxdest patch, but I think that is about it

Re: Project: cargodest
Posted: 24 Aug 2008 11:00
by broodje
I wouldn't mind creating a windows binary.... except that the diff can't be aplied by Tortoise

. The first line directs to /dev/null which isn't something you'd find on a windows machine. I'm not able to code anything in C++ so I've got no idea how to fix the diff.
Re: Project: cargodest
Posted: 24 Aug 2008 11:50
by jub
Windows binary.
Re: Project: cargodest
Posted: 24 Aug 2008 13:02
by Tekky
In this context, I would like to point out that in
this thread which I posted one year ago, I suggested that passengers find the fastest route to their destination based on train timetables. This has the advantage that well-serviced routes with many trains scheduled to take that route will be chosen more frequently by passengers. However, this also forces all passenger trains to be running on a timetable.
The thread mentioned above also contains a proposal for improving the timetable system.
Re: Project: cargodest
Posted: 24 Aug 2008 15:28
by cmoiromain
an idea about the minimap: maybe the most used routes (the ones carrying the most cargo) should be made thicker; that way it is possible to see high capacity lines more easily than local metro lines. If you think this could be a good idea I will post it on the wiki.
Re: Project: cargodest
Posted: 24 Aug 2008 15:40
by bokkie

Great job!! Seems to work pretty nice, although passenger generation feels a bit generous in the beginning with small network (not much of a challenge).