OK, I have a crash - this is right on starting a game, build first route, set off the first two trains and... crash.
My guess is that it's because I hit start on the first two trains (built at opposite ends of the route) on pause mode, and then let them go - being in identical layouts they would have arrived at opposite ends of the new route absolutely at the exact same moment, causing some confusion...
I'll soon have a look at all the crash reports. But first I have another problem: My MCF solver builds path cycles. This is not good. And I have a mostly-finished station GUI for you. As soon as I'm done with those two items I'll release a new version and then I'll debug those crashes. Bear with me a little ...
I've been playing for a while, and here are my observations:
-I haven't had any large bugs or crashes
-The map screen is pretty cool. The numbers are quite useless IMHO, but when I see a lot of red in the "icon" map, I know there's work to be done.
-Food seems to be routed to towns that are very close. It seems impossible to have a long range food network. Not sure why this is, but I thought I'd mention it.
Ok. So now I am confused. Maybe it just is me and I am not doing this right, but the patch never created routes for me except for one route that I do not know how it appeared.
So for clarification, this patch only builds demand if *you* have a *vehicle/train* that goes from point A to point B correct? So if I have 4 locations A B C and D, and I have a train going from A to B, I will have demand created for the A->B route but the patch will never create demand from A -> C or A -> D (assuming C and D accepts that cargo) unless I first send a vehicle/train from A -> C or A -> D. Correct? If not, then my savegame never had any *new* demand created.
Either I am assuming wrong (great possiblity) or others are not understanding what this patch does. If I am wrong, then maybe I do not have a Bug, maybe the demand generator is trying to build demand between two routes and I am not responding by servicing them. Or, I do have a Bug that the routes are not dropping off like they should.
I think if I am right, people are expecting it to work like I wanted to believe it did, and that If you have a station at a coal mine, and you have a station at a power plant, the demand generator would *create* demand between those two. Then if you added another power plant, it would create cargo at the coal plant waiting to be taken to the new power plant *before* a train went between them. But I do not believe that is how it works.
Either way, I am having fun playing with this patch, I find myself tweaking the train schedules way more than I used to. .
reylas wrote:So for clarification, this patch only builds demand if *you* have a *vehicle/train* that goes from point A to point B correct? So if I have 4 locations A B C and D, and I have a train going from A to B, I will have demand created for the A->B route but the patch will never create demand from A -> C or A -> D (assuming C and D accepts that cargo) unless I first send a vehicle/train from A -> C or A -> D. Correct? If not, then my savegame never had any *new* demand created.
That's right. Or in other words: cargo will only try to go to places where it can eventually arrive. I think this is a good thing. You don't want to have cargo for every possible destination on the map piling up at some bus stop in a remote village.
fonso wrote:That's right. Or in other words: cargo will only try to go to places where it can eventually arrive. I think this is a good thing. You don't want to have cargo for every possible destination on the map piling up at some bus stop in a remote village.
Ok, so let me ask this question. Say I have a coal mine (C1) that is serving a power plant (P1). Then I add another Coal Mine (C2) that is serving P1 as well. Then say I add another Power Plant (P2) to the network and C2 starts serving it with a train as well. So I have C1 -> train -> P1 <- train - C2 - train -> P2.
Will your patch see a route and *create* cargo for C1 -> P2. The reason I ask is this. Even though no train directly went from C1 -> P2, in that save game you will see cargo bound for P2 from C1 that is dropped of at P1, picked up by the train going to C2 and then fed to P2. I had no trains with a defined route that way.
If that is the case, great I like that. But if it is the case, then my bug (route would not die) is different since it wanted a direct route only instead of using trains going to a drop off point.
reylas wrote:
Ok, so let me ask this question. Say I have a coal mine (C1) that is serving a power plant (P1). Then I add another Coal Mine (C2) that is serving P1 as well. Then say I add another Power Plant (P2) to the network and C2 starts serving it with a train as well. So I have C1 -> train -> P1 <- train - C2 - train -> P2.
Will your patch see a route and *create* cargo for C1 -> P2. The reason I ask is this. Even though no train directly went from C1 -> P2, in that save game you will see cargo bound for P2 from C1 that is dropped of at P1, picked up by the train going to C2 and then fed to P2. I had no trains with a defined route that way.
Yes it will see there is a route from C1 to P2 via P1 and C2. There is no reason it shouldn't see it. If you didn't set explicit noload (or unload) orders at the power plants coal will be loaded at C1 by your first train, transferred at P1, picked up by the second train, transferred again at C2 and finally delivered to P2 by your third train. If you don't like that and want to specify the routes manually instead you should turn off cargo distribution for coal. You can also set explicit unload orders at stations to force delivery or transfer orders to force transfer. Those override the cargo distribution. Be aware that this might confuse the flow mapping and lead to results you didn't expect.
Although I have not yet tested your patch, I have a little question about destination picking. Apparently the cargo is dispatched between the possible destinations allowed by your network. Could it be made, that before it is connected, any industry will have a destination picked randomly on the map? To each primary industry there would be one target industry associated at the map generation, so to have access to an industry's production you must at least transport it to its associated industry, and then some of its cargo will also be routed towards other destinations.
That would add some constraints to the game. ATM, you can chose where you want to bring the cargo, with this system it would look more like the subsidies system, where you only deliver stuff, you don't chose exacly where.
Yes it will see there is a route from C1 to P2 via P1 and C2. There is no reason it shouldn't see it. If you didn't set explicit noload (or unload) orders at the power plants coal will be loaded at C1 by your first train, transferred at P1, picked up by the second train, transferred again at C2 and finally delivered to P2 by your third train. If you don't like that and want to specify the routes manually instead you should turn off cargo distribution for coal. You can also set explicit unload orders at stations to force delivery or transfer orders to force transfer. Those override the cargo distribution. Be aware that this might confuse the flow mapping and lead to results you didn't expect.
No no. That is good, I like that. I guess my issue comes into play then in that save game. One of the routes I was trying to get to die but never would ( the bug save game I posted a while back) was like this.
I am using a Coal mines (C1) as a drop point for other Coal mines farther away (4 mines total) So I was building trains at those other 4 mines to drop coal (transfer and noload) at C1. Suddenly, one of my coals mines (I think the third one) wanted a direct route to the powerplant itself. It built 390 tonnes of coal destined for the power plant that used to be dropped off at C1 then taken to the same powerplant. So my issue is two fold. I could never get the route to die so the coal continued to build, and the patch would never see that I had a train going to C1 that would eventually get the Coal to the same power plant it was requesting.
So in the case of my earlier pathing question, it seemed to find a way to get the coal there on it's own which was great, but refused to see an easier path using C1 and allowed coal just to build there. Make sense?
I hope what I am trying to describe helps you out. If not, let me know and I will help anyway possible. The save game is the same that I uploaded.
Hi Fonso,
first of kudos to you for doing this patch. I have been playing with the latest for about 10 hours and have not run into any major bug, though I have only used it in a passenger only game. (Only thing I noticed is that the tool tip for "Real/Planned Cargo" in the station window always reads Real Cargo, no matter what is selected)
I am really looking forward to your station GUI overhaul. I am hoping to see an option to display totals of cargo going to a certain destination, no matter what the origin is, it would greatly simplify planning capacity on the routes. I like what you have done with the bar graphs on the mini map. Would you be able to go into a bit more detail of what all the different colors and dimensions of the rectangular bars mean? At times the plain numbers are a little more informative, though they get hard to read once there are too many stations close to each other (inner city bus routes, for example). May I suggest a list window in which you can see all currently active routes and their corresponding information?
Again, thanks for your efforts and I am looking forward to its further improvement.
No more routing cycles. The MCF solver has two passes now. One with strictly increasing path lengths and one that only assigns additional flow to existing paths.
All demands are assigned now. The MCF solver is allowed to overplan links in the second pass now. This makes sure that cargo is actually routed according to the demands calculated before and not just to the place with the most convenient path.
Shiny Station GUI. With 6 grouping and 4 sorting options, destination estimation and an option to display the sent cargo instead of planned or waiting.
Cargo is properly rerouted if the link to its next hop disappears. Before it was sent "anywhere" and thus handled traditionally.
Link graph related source files get their own folder.
I'm only providing the all-in-one patch. You can pull the individual milestones from my git repository. I'll add a screenshot of the station GUI instead of the package. Tomorrow ...
Nice work! BTW, I won't be able to provide you with a savegame for the problem I posted before - didn't have any. I'll try to reproduce it, though.
One more question: does setting a train to 'no loading' work, now? There was a problem with that in the other (CargoDest) patch; a train would not only take no further passengers (as it should), it would also unload all current passengers (which it shouldn't).
MJS wrote:One more question: does setting a train to 'no loading' work, now? There was a problem with that in the other (CargoDest) patch; a train would not only take no further passengers (as it should), it would also unload all current passengers (which it shouldn't).
It should work as specified. That means no cargo will be loaded at the station. However, the link graph doesn't know about loading orders, so you will still get cargo wanting to use that link. If you don't provide any vehicles to load it, it will pile up. Generally using order modifications does work with cargo distribution but will confuse the flow mapping algorithm and you'll get cargo using unexpected routes or piling up somewhere. I suggest you only use them as temporary solutions for emergencies.
Thanks for the quick reply. I'll be careful with them. Yet they are supposed to help gameplay: what I want to do is build a link like the London-Watford Junction-Edinburgh trains, where you can travel from the first two stations to Edinburgh, but not between London and Watford; passengers between those stations should use local trains rather than crowd my expensive HSTs .
fonso wrote:
The branches correspond to the milestones mentioned above. Master is a clone of the main openttd repository. So if you want the latest version of everything, do:
Of course, with git you can also pull the milestones one by one and examine each step independently. This might be nice if you're reviewing the code.
I'm not very familiar with git yet. If something is wrong please tell me.
I don't know much about git myself either, but when checking out the repo for the first time the command is git clone not git pull.
I'm not posting win binary yet, because version detection didn't work for some reason(norev000). Does anyone know if git revision detection works with MSVC builds or am I doing something wrong? I have only used svn and hg before and those work correctly
1st pass of MCF solver is now allowed to overplan a path once if no demand has been routed between its source and destination yet. This makes sure every demand is at least partially met in the first pass. Before some demands couldn't be met which of course means the 2nd pass still cannot meet them and thus they remained completely unassigned.
2nd pass actually looks at the correct flows for determining if there is already a path now. Before it could still build circles.
Hmm... I'm not into this whole compiling thing, tried to figure it out but got scared away . Anyway, if someone has compiled a working version, I'd be very happy if he/she posted it here.
In the meantime I will read some more on compiling. It seems there are many programs to use, I don't even know where to start.......
me wrote:
I'm not posting win binary yet, because version detection didn't work for some reason(norev000). Does anyone know if git revision detection works with MSVC builds or am I doing something wrong? I have only used svn and hg before and those work correctly
It was easy problem to solve, just had to add git dir to path, I wonder why installer didn't do it automatically.
So here's the win32 binary: EDIT: oops I uploaded wrong zip
EDIT part 2:
It wasn't just wrong zip. I was compiling the wrong checkout
It would have been nice if one you 5 people who dowloaded my build would have said something.
Now that I tried to compile the correct one I get this error:
c:\cargodist testi\iygiuyg\openttd\src\station_gui.cpp(1112) : error C2440: 'initializing' : cannot convert from 'std::_Tree<_Traits>::const_iterator' to 'std::_Tree<_Traits>::iterator'
with
[
_Traits=std::_Tset_traits<CargoDataEntry *,CargoSorter,std::allocator<CargoDataEntry *>,false>
]
No constructor could take the source type, or constructor overload resolution was ambiguous