fonso wrote:Kimby wrote:
1. Go to Airport B
2. If load percentage is below 20, jump to step 5
3. Go to hanger Airport B
4. Go to Airport B, Full load any cargo, no unloading
5. Go to Airport A
What you're trying to do is 'if there's another plane loading cargo for A, directly leave, otherwise full load', right? That's a rather stupid idea in the first place as half of your planes are flying empty from B to A, but let's see what we can do to make that cargodist-friendly.
If there's lots of cargo available to go from A to B, but not from B to A, I don't mind planes flying empty from B to A. That sounds a lot better then not servicing the A to B cargo as fast as possible. I therefore fail to see why this idea would be 'stupid'. My planes make more money flying empty in one direction part of the time then by losing time waiting for cargo at B. Not to mention the horrendous penalties for late delivery when you finally get around to deliver the cargo that was waiting all the time at A.
fonso wrote:
It's true that order 2 is nondeterministic. While the plane is at B with order 1 we don't know if it's going to A or B next. And it's actually strongly nondeterministic as that depends on what cargo it loads. If it goes to B next it shouldn't load any cargo headed for A, yet. However, then it will be empty when finishing order 1 and directly go to A. Cargodist cannot decide what to do there. I'm opposed to a "load for" order as you should either handle the distribution manually or leave it for cargodist. Anything in between will destroy the routing. Granted, there already are some ways to do that, but I don't want to introduce additional ones.
My point is: why is order 2 nondeterministic when order 4 clearly states "no unloading" ? No matter what the result of the condition is, the first place the plane can unload is at A. Since both ends of the condition result in the same unloading station, it should be deterministic in my view.
fonso wrote:
One thing to note is that planes and ships cannot visit any stations which aren't in their order list, even if the orders are nondeterministic. And even for trains and road vehicles most conditional orders can only evaluate to a fixed set of stations. So what I can try to do is further restrict the cargo to be loaded at nondeterministic orders in these cases. This could maybe solve your problem. I'll check if this is feasible. Another thing to note is that we don't have to consider further 'no unloading' stops at the same station when checking for determinism. However, if you have a nondeterministic unloading stop at the same station we really have strong nondeterminism as the previously loaded cargo will be rerouted there.
Since my example was about planes I didn't mention it, but I do exclusively use "non-stop" orders as recommended for cargodist. I agree that not loading cargo for a destination that's listed nowhere in the orders list would be helpfull.
fonso wrote:
In any case I'll have to prevent counting the previously loaded cargo twice as 'sent' at the second stop. Otherwise you'll only get half of the planned cargo on that link. This is going to be hideously complicated and no one will understand it. Also it will break those nice "Go to A; Go to depot; Go to A; Go to B" order lists. At the moment the vehicle will unload at the first visit at A, then go to the depot empty and load at the second visit. Maybe I'll just leave it as it is.
In the example you give, you could simply get the desired result by using "Go to A (no loading); Go to depot; Go to A; Go to B" as you'd do in a 'normal' game without cargodist. Also, if you'd change things to only ignore the stops with "no unloading" to determine the destination, the command above would still work as it does now. The loaded cargo would also not be counted twice. In my case I'm not unloading the already loaded cargo, so it's only loaded once. In your example, no cargo would be loaded at the first visit to A.
I guess what I'm asking for that would fix this issue and some others I can think of, is
that stops with the "no unloading" set, would be ignored to determine the next unloading stop. I'm franky unclear as to why that's not yet the case.
Another example: consider a coal train visiting several mines in an attempt to get some coal and when it gets that coal, would deliver it to some location like a power plant. The next stop for the coal of the various mines should in my opinion be the power plant, not some other mine where no unloading is done. I agree the "no unloading" should be specifcally set instead of simply assumed due to coal not being accepted in the station at the moment as to avoid surprises later on. Of course this example only becomes relevant when another coal train visits the same mines but delivers to a different station like a steel mill.
I consider conditional jumps to be a powerful tool. I also feel that OpenTTD without Cargodist is rather lacking. Add those two points together and you'll understand why I hope to get Cargodist play nice with the power of conditional jumps. I'm aware that this will not always be trivial, but in this case I honestly don't see where the problem is.