Page 20 of 154

Re: Cargo Distribution

Posted: 12 Jun 2009 14:00
by Yexo
2007Alain2007 wrote:Hi

The road map for openttd 8 dose not say its gonig to have this patch but dose say it have cargodest

just liked to know what ther going to have in it
We don't know yet. Roadmaps can be altered along the way, and there is no guarantee either of them hits trunk at all (although I really hope so).

Re: Cargo Distribution

Posted: 14 Jun 2009 18:54
by fonso
New version:
  • included smallmap zoom function from http://www.tt-forums.net/viewtopic.php?f=33&t=32923 as first step for an overhaul of the smallmap. You can zoom in now if the boxes overlap too much. (And you can zoom out, too, but that's probably less interesting for cargodist.)
  • detect and eliminate cycles after each loop of the first pass instead of trying to do it for each path. Like that it's simply a depth first search and, in contrast to the previous method, there is a proof that it actually finds all cycles. And humans can read the code involved ;). This solves Wasila's problem.
I restructured the branches. cd-gui is gone. Now there is a branch called smallmap-zoom for those who only want an updated version of smallmap zooming without cargodist. Then there is the usual capacities->components->demands->mcf->flowmapping-core->flowmapping-vehload hierarchy. Branching off from flowmapping-vehload there are station-gui and smallmap-stats. smallmap-stats also pulls from smallmap-zoom. For your convenience smallmap-stats and station-gui are merged in a new branch named "cargodist". This is the one you have to pull from if you want all of cargodist.

Re: Cargo Distribution

Posted: 14 Jun 2009 22:34
by fabca2
I played two days with IS2b3, it's nice,
I have still two suggestions :

FIRST :
new companies are always marks as "not allowed" for sharing,
not allowed for sharing
not allowed for sharing
IS2.PNG (10.12 KiB) Viewed 3462 times
For example I started my company "fab" after many others, and yo uwill see CYM welsh forgot to change sharing propoerty to add new company.
my suggestion is to add a new flag : "Next company : allowed/not allowed"
if he flag next company as "allowed" I would been allowed.

SECOND :
a competitor train arrive at my shared station, I don't know how much money I got this that train ?
or : my train arrive to a competitor station, I don't know how I paid for runing his network ?
I know there is the finance window, but it's too global, I don't know how if it cost me too much or not.

Thank you.
bye.

Re: Cargo Distribution

Posted: 14 Jun 2009 22:59
by Auge
Hello
fabca2 wrote:I played two days with IS2b3, it's nice,
I have still two suggestions : ...
Ahem, you are in the wrong thread. Please post your suggestions there.

Tschö, Auge

Re: Cargo Distribution

Posted: 15 Jun 2009 07:30
by fabca2
Auge wrote:Hello
fabca2 wrote:I played two days with IS2b3, it's nice,
I have still two suggestions : ...
Ahem, you are in the wrong thread. Please post your suggestions there.

Tschö, Auge
Ooops, sorry... it was late yesterday night, and I was reading the two threads, so please can a moderator move this post to the right thread ?
Thank you.

Re: Cargo Distribution

Posted: 15 Jun 2009 12:23
by fonso

Re: Cargo Distribution

Posted: 15 Jun 2009 13:22
by KingNimby
Hi, I'm trying to combine the cargodist and copy+paste patches because they're my two favourites but I'm having some issues. cargodist will happily patch into the SVN but copy+paste won't. If I go back to the 0.7.1 source, copy+paste is happy but cargodist no longer is. Should the latest cargodist patch work with the 0.7.1 source? If so, where am I going wrong? If not, is there an older version I can use that does? I understand that this is more a copy+paste project issue, but it seems very inactive at the moment and so I am asking here. Also, it's fair to say that I'm not very experienced with the whole patching/compiling system and it took me considerable time just to get this far. Should I even be attempting to combine these two patches into one build of the game?

Anyway, just in case it is useful, here is the output from MSYS when I attempted to patch cargodist into 0.7.1:

Code: Select all

$ patch -p1 < cargodist_r16577.diff
patching file `projects/openttd_vs80.vcproj'
Hunk #3 succeeded at 2116 (offset -16 lines).
patching file `projects/openttd_vs90.vcproj'
Hunk #3 succeeded at 2113 (offset -16 lines).
patching file `source.list'
Hunk #3 FAILED at 482.
1 out of 3 hunks FAILED -- saving rejects to source.list.rej
patching file `src/aircraft_cmd.cpp'
Hunk #1 FAILED at 1356.
Hunk #2 succeeded at 1381 with fuzz 1 (offset 8 lines).
1 out of 2 hunks FAILED -- saving rejects to src/aircraft_cmd.cpp.rej
patching file `src/autoreplace_cmd.cpp'
patching file `src/cargo_type.h'
patching file `src/cargopacket.cpp'
Hunk #1 FAILED at 4.
Hunk #2 FAILED at 17.
Hunk #3 succeeded at 125 (offset 47 lines).
Hunk #5 succeeded at 353 (offset 47 lines).
2 out of 5 hunks FAILED -- saving rejects to src/cargopacket.cpp.rej
patching file `src/cargopacket.h'
Hunk #1 succeeded at 9 with fuzz 1.
Hunk #3 succeeded at 40 with fuzz 1.
Hunk #4 FAILED at 53.
Hunk #5 succeeded at 78 with fuzz 2 (offset 4 lines).
Hunk #7 succeeded at 120 with fuzz 2 (offset 4 lines).
Hunk #9 succeeded at 205 (offset 4 lines).
1 out of 9 hunks FAILED -- saving rejects to src/cargopacket.h.rej
can't find file to patch at input line 730
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/core/math_func.cpp b/src/core/math_func.cpp
|index 360ec0e..90e6b4f 100644
|--- a/src/core/math_func.cpp
|+++ b/src/core/math_func.cpp
--------------------------
File to patch:
(I stopped it at that point)

Re: Cargo Distribution

Posted: 15 Jun 2009 14:21
by fonso
The cargodist patch is always guaranteed to cleanly apply to the trunk SVN revision specified in the file name. On any other revision it may or may not apply. You can pull older revisions of cargodist (and trunk) from my git repository at http://fickzoo.com/fonsinchen/openttd.git . You can also mix and match changesets from trunk and cargodist (and possibly other patches) using git.

Re: Cargo Distribution

Posted: 15 Jun 2009 15:49
by KingNimby
Well, that's one step beyond my level of expertise. I can't make head nor tail of it. Thanks anyway.

Re: Cargo Distribution

Posted: 15 Jun 2009 18:58
by fonso
All windows binaries I have built myself have been moved to http://fickzoo.com/fonsinchen/binaries
Gitweb is installed at http://fickzoo.com/fonsinchen/openttd.git

So now you can see all the crazy branching and merging in realtime on the intertubes ;)

Binaries of the latest version for all supported platforms have been built on the compile farm and are available here: http://mz.openttdcoop.org/bundles/cargo ... cargodist/

Re: Cargo Distribution

Posted: 17 Jun 2009 08:26
by Ammler
With the new binary bundles, we have started a server on our DevZone:
Image
Host mz.openttdcoop.org:3981

IRC: [url=irc://irc.oftc.net/openttdcoop.dev]#openttdcoop.dev[/url]

As usual the first game without any newgrfs...

Re: Cargo Distribution

Posted: 17 Jun 2009 10:14
by Auge
Hello
fonso wrote: Binaries of the latest version for all supported platforms have been built on the compile farm and are available here: http://mz.openttdcoop.org/bundles/cargodist/g714743fa/
Wrong URL, corrected: http://mz.openttdcoop.org/bundles/cargo ... cargodist/

Thanks and tschö, Auge

Re: Cargo Distribution

Posted: 17 Jun 2009 11:12
by Ammler
Symlinked the other directory, Autopilot needs the same version string as the game. Thanks for notice.

Re: Cargo Distribution

Posted: 18 Jun 2009 06:50
by swifty
Hi, I've been testing Cargodist for a few days now and I must say I'm very impressed, it looks very promising and I'm looking forward to starting a "proper" game when I have time. However, I have a question about something I noticed about the passengers (no save file because this is just a general observations in many games). At the start of the test game, I pick the biggest city and build a railway station on its edge. I connect it to another close town (about 15 tiles away). Then I build a bus station in the big city center and connect it with buses to the railway station on edge of the city (about 10 tiles away). Something like this:

Code: Select all

BUS
|
|
RAIL==========RAIL
With this setup there are much more passengers generated at the hub who wanted to go just to the city center by bus, instead of to the other town by train. I noticed you already said earlier in this thread this is intented, the demand function prefers closer destinations and local transport should have the most passengers.
But I'm thinking - if there are two big cities on the map, far from each other, connected with each other by high capacity express trains and also each of them locally connected with some nearby villages/towns (branch lines with star topology). Then there will be only a minority of passengers generated directly between the two cities, because the demand function will prefer the close towns, right?
If that's the case, should there maybe be some kind of multiplier, that could boost the distant destination's "score", based on for example the city population or the station size? Only for the passenger/mail demand though.

Re: Cargo Distribution

Posted: 18 Jun 2009 07:42
by Eddi
i don't see why this is a problem. "realistically", the majority of all people movement is every-day-movement from home to job, the next most common is from home to (food) shops. these are usually short distance transport, e.g. within the same city. long distance travel usually falls into one of three categories:
  1. long distance commuter (often on weekends (friday/sunday))
  2. business travellers
  3. tourists
the amount of people is usually significantly smaller than the short distance travellers.

Re: Cargo Distribution

Posted: 18 Jun 2009 08:17
by swifty
Yeah, that sounds about right. It's just that it would also seem logical, that if you have for example a town with 1000 population, connected to some nearby villages with hundreds population, and then connect the town to a big city (5000 population) further away, there should also be quite a lot people wanting to go there, because that city should be "important" for them. Like in reality people need to go to their capitals to sort out paperwork and stuff.

In theory, the symmetric function for passengers should take care of that, boosting the demand on the smaller city size because there is a huge demand on the big city size (right?). But that's only if the big city doesn't already have a star topology hub itself, which will once again prefer the local transport there. So the long express trains might end up not fully loaded. At least that's how I understand it...

Re: Cargo Distribution

Posted: 18 Jun 2009 10:27
by fonso
swifty, your idea is too vague. I can't think of a way to express it as a function of the available parameters. Unfortunately that would be necessary in order to write a new demand function. And also I have said multiple times that anyone can write additional demand functions. So if you like, have a look at demands.h and demands.cpp, write a new demand function and post the resulting patch. Then we can see if it's better.

Re: Cargo Distribution

Posted: 18 Jun 2009 10:42
by swifty
Ok, I will do some more testing on this subject and try to come up with something more "mathematical". :)

Re: Cargo Distribution

Posted: 18 Jun 2009 11:29
by fonso
And mind that the existing symmetric demand function does take the size of stations into account. Size is measured as the moving average of the amount of pax/goods generated there. Demand between big stations is generally higher than demand between small stations. However, the demand functions have a quirk. If there are only few stations (for example 3) the resulting demands are very inaccurate. Perhaps I should fix that.

Re: Cargo Distribution

Posted: 20 Jun 2009 21:29
by dasy2k1
Your observation about this is correct and at first many small journeys are made,
but as time passes you will soon find you cant fit enough trains in the high capacity experesses!

build the 2 stations first, then build good local bus links at both ends (big stars with the station as the hub or circliar lines with many stops (and busses in each direction)) when thease are flowing well and you have to start buying more busses then its the time to connect the stations with a train, a few months later the train should be getting full (it takes a while as only the new cargo generated after you link them will go to them the rest will wait to go locally