Cargo Distribution
Moderator: OpenTTD Developers
Re: Cargo Distribution
Gammro, I can't see the plane loading things it shouldn't. When I load the game it loads passengers from Miami to NY, then goes to JFK and unloads there. After that it loads some mail and waits a long time for passengers that don't arrive.
This game has several problems, though:
1. All your road vehicles use nondeterministic orders. This makes them load any cargo, no matter what next hop the cargo or the vehicles are going to. This is a reason why the people going to Miami never arrive at JFK. Use non-stop orders to prevent that.
2. You are using "unload" orders. This forces vehicles to deliver their cargo to the local station, no matter if the cargo actually wants to be delivered or rather travel on. This is another reason why no one going to Miami shows up at JFK. Use order modifications other than "full load" only if you know what you are doing.
3. The plane is basically always waiting and only rarely transporting anything. This is why the mail link between JFK and Miami frequently drops to 0 capacity producing lots of mail via "any station". I don't see people to "any station". Where would those be?
And your savegame uncovers a bug in the smallmap. Certain links aren't shown. I'll fix that, thanks.
This game has several problems, though:
1. All your road vehicles use nondeterministic orders. This makes them load any cargo, no matter what next hop the cargo or the vehicles are going to. This is a reason why the people going to Miami never arrive at JFK. Use non-stop orders to prevent that.
2. You are using "unload" orders. This forces vehicles to deliver their cargo to the local station, no matter if the cargo actually wants to be delivered or rather travel on. This is another reason why no one going to Miami shows up at JFK. Use order modifications other than "full load" only if you know what you are doing.
3. The plane is basically always waiting and only rarely transporting anything. This is why the mail link between JFK and Miami frequently drops to 0 capacity producing lots of mail via "any station". I don't see people to "any station". Where would those be?
And your savegame uncovers a bug in the smallmap. Certain links aren't shown. I'll fix that, thanks.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Hugely informative, thanks Fonso 
And I think I was a bit lazy with my terminology when I wrote that post (it was quite late) - I actually meant station ratings rather than town rating (I often play with one station per town)
It definately sounds good - the only thing I didn't fully get is whether there's there a limit to how overloaded an A-Z route will become compared to capacity (ie 120% of capacity), or is it just a case of "demand increases, make sure capacity keeps up". I think you describe the latter, but I couldn't quite work it out
Oh, one extra thing after just seeing your message about using order modifications. Is it possible to use a station as a reversing siding only? ie
A-B-C-(reversing siding)-C-B and back to A
With the C-(rs)-C orders being "unload leave empty", "no loading" and "no unloading" respectively. Will passengers still be created trying to go to/from the reversing siding, or will that "route" not be created?

And I think I was a bit lazy with my terminology when I wrote that post (it was quite late) - I actually meant station ratings rather than town rating (I often play with one station per town)
It definately sounds good - the only thing I didn't fully get is whether there's there a limit to how overloaded an A-Z route will become compared to capacity (ie 120% of capacity), or is it just a case of "demand increases, make sure capacity keeps up". I think you describe the latter, but I couldn't quite work it out

Oh, one extra thing after just seeing your message about using order modifications. Is it possible to use a station as a reversing siding only? ie
A-B-C-(reversing siding)-C-B and back to A
With the C-(rs)-C orders being "unload leave empty", "no loading" and "no unloading" respectively. Will passengers still be created trying to go to/from the reversing siding, or will that "route" not be created?
Jon
Re: Cargo Distribution
Hmm jes, well it was a bit late yesterdayfonso wrote:Gammro, I can't see the plane loading things it shouldn't. When I load the game it loads passengers from Miami to NY, then goes to JFK and unloads there. After that it loads some mail and waits a long time for passengers that don't arrive.
This game has several problems, though:
1. All your road vehicles use nondeterministic orders. This makes them load any cargo, no matter what next hop the cargo or the vehicles are going to. This is a reason why the people going to Miami never arrive at JFK. Use non-stop orders to prevent that.
2. You are using "unload" orders. This forces vehicles to deliver their cargo to the local station, no matter if the cargo actually wants to be delivered or rather travel on. This is another reason why no one going to Miami shows up at JFK. Use order modifications other than "full load" only if you know what you are doing.
3. The plane is basically always waiting and only rarely transporting anything. This is why the mail link between JFK and Miami frequently drops to 0 capacity producing lots of mail via "any station". I don't see people to "any station". Where would those be?
And your savegame uncovers a bug in the smallmap. Certain links aren't shown. I'll fix that, thanks.


Also, ill look into the buses i've set up. Now I finally know how to set those up so they'll unload their passengers at the right station.
Thank you!
Damn, I realized I now have to reassign quite a bit of buslines

Re: Cargo Distribution
It doesn't have anything to do with station rating either.audigex wrote: And I think I was a bit lazy with my terminology when I wrote that post (it was quite late) - I actually meant station ratings rather than town rating (I often play with one station per town)
There is no limit to overloading a route. Demand is calculated without regarding capacities (except for a binary connected/disconnected sense). All demand is then routed in step 3. This takes place in two passes. In the first pass the shortest routes are saturated up to the short path saturation. If you have more demand than capacity any route will eventually be the shortest non-saturated one, so at the end of the first pass all routes will be saturated up to that percentage. In the second pass more flow is assigned to the routes with the most capacity left or the least capacity overloaded until all demand is met. This is done in turn for all routes. After assigning a share of demand to a route A another route B may be less overloaded than A and will get the next share and so on. In the end all routes are equally overloaded. The size of those shares is determined by the accuracy setting (and that's also used for the first pass and the demand calculation). The smaller the shares are the more accurate that "equally overloaded" is, but the longer it takes to calculate.audigex wrote: It definately sounds good - the only thing I didn't fully get is whether there's there a limit to how overloaded an A-Z route will become compared to capacity (ie 120% of capacity), or is it just a case of "demand increases, make sure capacity keeps up". I think you describe the latter, but I couldn't quite work it out![]()
Usually this should work, but there are some preconditions:audigex wrote: Oh, one extra thing after just seeing your message about using order modifications. Is it possible to use a station as a reversing siding only? ie
A-B-C-(reversing siding)-C-B and back to A
With the C-(rs)-C orders being "unload leave empty", "no loading" and "no unloading" respectively. Will passengers still be created trying to go to/from the reversing siding, or will that "route" not be created?
- (rs) must be C's exclusive siding. If you have another route like D-(rs)-D then the MCF solver may plan a flow C-(rs)-D which obviously doesn't work
- If the demand function is symmetric (rs) mustn't produce cargo the vehicle is carrying. If it's antisymmetric (rs) additionally mustn't accept the cargo. Otherwise the MCF solver will plan flows between C and (rs). With the order modifications you can prevent the vehicle from actually taking the cargo there, but you can't prevent the cargo from piling up at C and (rs). All other routes involving C and (rs) are obviously circles and thus no flow will be planned for them.
- Leave out the explicit "unload" directive at the first visit to C. As there won't be a planned flow from C via (rs) the vehicle will leave empty anyway and "unload" makes it deliver all its cargo and not transfer anything. This is probably not your intention.
You can set the "no loading" directive at (rs), but it won't help with anything. Either (rs) produces cargo. Then you can prevent the vehicle from loading it there, but you can't prevent the cargo from piling up at (rs). Or (rs) doesn't produce cargo, then the vehicle won't have anything to load anyway. In the same sense the "no unloading" order at the second visit to C can be set, but won't help. I also don't know if "no vehicle has ever loaded at (rs), but may have visited (rs)" is sufficient for "(rs) isn't producing cargo" in the case that houses or industries supplying the cargo are in proximity to (rs). Someone should try that. If that's the case, the "no loading" directive at (rs) is actually important and the second precondition is loosened a little.
You can also set the "no loading" directive at the first visit to C as safety measure, but most times it should do that anyway. Provided that (rs) doesn't accept or produce cargo it will only fail if (rs) is a nondeterministic order or if there is cargo via "any station" waiting at C.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Hopefully it will work then
but if not, I can survive. I just occasionally like to use a siding to allow some trains to run the busy "trunk" section of a mainline without having to turn the stations into partial terminii. If it can't be done with dist, I'll just change the stations, but it appealed to my sense of realism. Otherwise I'd just allow (rs) to be treated as a station, but I'd rather not if it's only got a limited service.
Thanks for the rest of the clarification - it makes sense, and I like how passengers will use secondary routes if the shortest is at capacity, my networks usually have multiple routes
although it would be interesting to see someone go Birmingham-(cross country)-sheffield-(ecml)-london if the west coast mainline was too full 

Thanks for the rest of the clarification - it makes sense, and I like how passengers will use secondary routes if the shortest is at capacity, my networks usually have multiple routes


Jon
Re: Cargo Distribution
Hello,fonso wrote: 1. All your road vehicles use nondeterministic orders. This makes them load any cargo, no matter what next hop the cargo or the vehicles are going to.
I am at a place I cannot play... to perform test.
But I have a question, what's do you call "nondeterministic orders" ?
for example orders like :
- goto station A
- goto station B
- goto station C
are these orders deterministic enough to be used with your patch ?
Thank you.
regards.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Cargo Distribution
Recently we discussed the patches to be included in the next world wide openttd gaming day (wwottdgd/3) patch. One thing we consider is to add this patch to the collection, but we found one feature possibly desirable: to distinguish between mail/pax and other cargos. E.g. have destinations for pax and mail, but use the conventional way for cargo delivery for all other cargos.
Is such feature via advanced setting envisioned or would you, fonso, mind adding it?
Is such feature via advanced setting envisioned or would you, fonso, mind adding it?
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Cargo Distribution
Nondeterministic orders are orders that don't tell what is the next station the vehicle will stop at. These are:fabca2 wrote: But I have a question, what's do you call "nondeterministic orders" ?
- for trains and road vehicles: orders without "non-stop". Trains and RV can stop at stations they happen to pass on their way to the order's destination. This is why cargodist can't know the next stop when loading the vehicle. "non-stop" prevents that behaviour.
- conditional orders with branches leading to different stations. All branches of the (possibly nested) conditional orders are evaluated when the vehicle loads cargo and if the branches lead to different stations the order is nondeterministic. However, if you just have something like "1. if not in need of service jump to 3.; 2. go to depot; 3. go to station X" in your order list that's deterministic as the next station will be the same (X) in both branches of the condition and cargodist isn't interested in stops at depots.
This is already implemented. You can set the demand function for pax, mail, express, armoured and "other cargo" seperately. If you set it to "unhandled" cargodist won't touch this cargo. I can add further distinctions for "everything else" especially for wwottdgd if needed.planetmaker wrote:Recently we discussed the patches to be included in the next world wide openttd gaming day (wwottdgd/3) patch. One thing we consider is to add this patch to the collection, but we found one feature possibly desirable: to distinguish between mail/pax and other cargos. E.g. have destinations for pax and mail, but use the conventional way for cargo delivery for all other cargos.
Is such feature via advanced setting envisioned or would you, fonso, mind adding it?
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Actually never having any vehicle loading at a station is sufficient to not create any supply there. Have a look at the attached example around Bordeaux. The station "Bordeaux" is well capable of producing passengers, but it doesn't as no vehicle has ever loaded there. The vehicle visiting the three stations can use it as reverse siding without triggering passenger production. The only necessary order modification is "no loading" at Bordeaux. If I had another "no loading" at the first visit to Bordeaux Forest it wouldn't take any passengers via "any station" from Bordeaux Forest to Bordeaux, but that's not necessary to prevent passenger production at Bordeaux. (There were passengers via any station at Bordeaux Forest when I opened the route and some of them were taken to Bordeaux).audigex wrote:Hopefully it will work thenbut if not, I can survive. I just occasionally like to use a siding to allow some trains to run the busy "trunk" section of a mainline without having to turn the stations into partial terminii. If it can't be done with dist, I'll just change the stations, but it appealed to my sense of realism. Otherwise I'd just allow (rs) to be treated as a station, but I'd rather not if it's only got a limited service.
Thanks for the rest of the clarification - it makes sense, and I like how passengers will use secondary routes if the shortest is at capacity, my networks usually have multiple routesalthough it would be interesting to see someone go Birmingham-(cross country)-sheffield-(ecml)-london if the west coast mainline was too full
- Attachments
-
- example.sav
- (1.06 MiB) Downloaded 70 times
The guy on the picture is not me, it's Alonso.
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: Cargo Distribution
Can you uplaod the save ith no GRFs please
Becuse right now i am losting moeny on the game i am doing so its proble some thing with the odders
So i like to see your set up and odders
Becuse right now i am losting moeny on the game i am doing so its proble some thing with the odders
So i like to see your set up and odders
For Community Integrated Version http://code.google.com/p/civopenttd/
Re: Cargo Distribution
Alain, when people post example saves it's usually worthwhile bunging in the money cheat if you want to examine it - example saves are usually made with no money-maker. On the same theme, however, what version is it made with? 

Jon
Re: Cargo Distribution
OK, here's a reverse siding showcase without GRFs. I don't think that's your problem, though. Reverse sidings probably aren't a very common thing. It's just audigex's style of avoiding terminal stations and I went and proved that it's possible to do that with cargodist.2007Alain2007 wrote:Can you uplaod the save ith no GRFs please
Becuse right now i am losting moeny on the game i am doing so its proble some thing with the odders
So i like to see your set up and odders
This is made with the latest version in git: af3ef9dc9552acf81e6fe0c6713a7b1607f123fe - it should be compatible with the latest version posted in this thread.
- Attachments
-
- example2.sav
- (15.12 KiB) Downloaded 69 times
The guy on the picture is not me, it's Alonso.
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: Cargo Distribution
Its just i am so used to the old way of playing
Is there any thing that dose not work with the odders or any thing i need to know
Is there any thing that dose not work with the odders or any thing i need to know
For Community Integrated Version http://code.google.com/p/civopenttd/
Re: Cargo Distribution
Not sure if this is a bug or something not yet finished...using cargodist 17268 as supplied by an earlier post.
Train visits station C that has passengers for station A and B. This train can only visit station A and yet seems to pick up all passengers available even though station A is a dead end (no other services from this station).
These are not passengers for "any" station but specifically for station B.
Unfortunately I've only recently tried this patch so I've no idea if this is currently meant to happen...
Train visits station C that has passengers for station A and B. This train can only visit station A and yet seems to pick up all passengers available even though station A is a dead end (no other services from this station).
These are not passengers for "any" station but specifically for station B.
Unfortunately I've only recently tried this patch so I've no idea if this is currently meant to happen...
Re: Cargo Distribution
To save Alonso the work3iff wrote:Not sure if this is a bug or something not yet finished...using cargodist 17268 as supplied by an earlier post.
Train visits station C that has passengers for station A and B. This train can only visit station A and yet seems to pick up all passengers available even though station A is a dead end (no other services from this station).
These are not passengers for "any" station but specifically for station B.
Unfortunately I've only recently tried this patch so I've no idea if this is currently meant to happen...
Please post a save game - there are lots of things this patch should and shouldn't do. Only a savegame holds the truth.
A question that does spring to mind, is did station A ever have a service to station B?
It may be the link hasn't timed out, and so the solution is patience

John Mitchell
http://www.johnmit.net
http://www.johnmit.net
Re: Cargo Distribution
Never was a link. I was just a few months into a test game.
save enclosed. It's train 2 that has the deadend route that picks up passengers to other places.
save enclosed. It's train 2 that has the deadend route that picks up passengers to other places.
- Attachments
-
- Cargo Testing, 21st May 1951.sav
- (35.75 KiB) Downloaded 64 times
Re: Cargo Distribution
Another case of nondeterministic orders. Read my last 10 posts. Most of them advice someone to set "non-stop" on their orders. And it's not so hard to completely prevent that problem. Go to "Advanced settings" -> "Vehicles" and then just enable "new orders are non-stop by default". Everyone using cargodist do that right now, please. And then, if you think you really need some vehicle to stop at every station it might encounter you can still disable non-stop for that particular vehicle manually.3iff wrote:Never was a link. I was just a few months into a test game.
save enclosed. It's train 2 that has the deadend route that picks up passengers to other places.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Hey fonso, sorry to be a pain, but that example doesn't work in the last uploaded version (g875fc135M, according to the title bar). Is there a newer binary available?
If you don't have time, don't worry about it - I really only wanted to know if it worked - but it'd be handy to have a look myself.
If you don't have time, don't worry about it - I really only wanted to know if it worked - but it'd be handy to have a look myself.
Jon
Re: Cargo Distribution
audigex, you are running a version from June 1st. It corresponds to trunk version r16499 ... so either you have mixed up something or the person who built your binary. Please check that.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Aha, ignore me - it appears I have two cargodist builds, I didn't realise I had an older one. I'll try it with the newer one now 
Edit: Yup, the last one works - my bad
It crashed almost immediately, so I'm not sure what that's about - about 30 seconds after I loaded the game and 10 seconds after unpausing :s
I'll try again, see if it's a fluke

Edit: Yup, the last one works - my bad

It crashed almost immediately, so I'm not sure what that's about - about 30 seconds after I loaded the game and 10 seconds after unpausing :s
I'll try again, see if it's a fluke
Jon
Who is online
Users browsing this forum: Amazon [Bot] and 29 guests