News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Boarding-only stops, intercity route settings, etc...

Started by VS, November 26, 2008, 08:29:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hradtom

Magic_Gorter wrote: But to build those options (near/far) shouldn't be build in because it's far from realistic so stay with the way it's right now..

DISAGREE! The current alghoritm is to load passengers to nearest stations and it's not realistic at some lines (see LONG line A-B-C and SHORT line A-B), although the other option (farther stations first) should be good.

On the other hand, there are lines, where current system (nearest stations first) is good (for example EXPRESS A-C and LOCAL A-B-C).

Why do you protest against the switch? If the switch will be programmed, you could switch all your lines to load nearest station first and that's what you want (stay with the way it's right now). But someone (like me) should improve his line system with using the other option (far station first) on some lines.

joecz

To this subject I have two ideas:
1.  I think we could handle goods and passengers differently. The option to load goods to farthest destination first is more profitable. But it gets in conflict with express lines, so passengers' transportation could keep to loading nearest destination.
2.  I thought about the idea of loading the passengers who are in the largest group of destination. (100 to A, 10 to B -> load first passengers to A, then to B) My idea is, that the train (assuming capacity of 50) loads 100/110*50=45 passengers to A and 10/110*50=5 passengers to B. (The problem of exactly half passengers could be solved by rounding down x.5 and just loading another passenger to A.)
What do you think?

micslu

Windows GDI 99.18-1727 + Pak128 - free play option (no bankruptcy  ;))

I've experienced many times sudden surge of passengers to certain stops on bus/tram routes.
(Most likely because I wasn't paying attention to that terminal  ???)

A - B - C - D - E - F
where passengers waiting at A and also at B & C & D ... grow into hundreds and even thousands at A
for destination F and there are still numerous passengers from A to B - C - D - E as well.
With bus routes, easiest solution is adding more buses to the route until the queue stabilized.
But with tram route, running more trams on the same line require signal hassle (which I don't care for).

My solution turned out to build a separate tram line A to F (I have money!) with a separate tram stop
at A, make this Tram#2 express A - F, scheduled at A to wait for 100% load.
All new passengers generating at A going to F would load to Tram#2 while Tram#2 is at A
(and therefore will load onto the local stops Tram#1 when #2 is away).

Sorry to be long-winded but above seems to be one of the solutions to passenger loading sequence.
However, this is only easy with Tram that can share the stop with Buses. Otherwise, a dedicated
train platform or bus stop that will block any other train or bus is needed while waiting to fill
set capacity. Adding another rail line and platform can be a major redevelopment work in built up areas!

Ciao!

prissi

Switching is not easy (as is has to be stop and line dependent) and handling passenger different from other goods is not desirable, to keep overall consitency. As said before an overflowing line will overflow with any combination. Provide better service is the task of the player. Routing passengers is not.

isidoro

How nice! What an interesting discussion! Here's a summary of possibilities:

Situation: a vehicle arrives and there's more cargo to be loaded than its capacity.
Variables to choose from: distance to destination, amount waiting (imagine if we add more)
Ideal possibility: choose the ones waiting more time (not feasible)
Possibilities:

  • Farthest destinations first (old method)
  • Nearest destinations first (present method)
  • Highest amount first
  • Lowest amount first
  • Proportional to the amount waiting

I'm against the first, the second and fourth because it can easily lead to starvation (pure priority, some destinations will never be served).  Third includes a feedback mechanism so that all can get a chance to be served.  That's more important, I think, for goods.  If one of the starvation destinations is a factory that is the head of a chain, all the chain will not produce.  For passengers, they will accumulate, but I think it is not so important.  Not to stop this beautiful thread (independently of if any method will or will not get to simutrans code), another possibility not too expensive which effectively avoids starvation:

At each station, there is a mark in the list saying from which destination it was extracted cargo last time.  We start our search on the following destination until we load our vehicle.

And a last one, cheaper still, choose it at random.

z9999

Quote from: isidoro on December 02, 2008, 01:51:59 AM
What an interesting discussion!

I don't think so.  ;D
Each player has each playing style. Your priority might not be the same for other player. And each situation is different, it is impossible to prioritize in accordance with distance or amount.

I'm dealing with current system, and don't need alternative.

VS

I can see easily how Isidoro's #3 is the same as #4. In principle, if you assume the capacity of link is between the highest and lowest amount, it works. However, as soon as it is insufficient even for the lowest amount... I will do some simulations and come back.

Hm... just to add something less subjective to discussion: time-based, serving oldest, equals fifo, which is by nature unsorted, except by its function & design, so it might win performance-wise (even over random?). Just append as it comes and it's already sorted as you want.

And it was interesting... at least showed we are as a community capable of polite disagreement! :)




Well. The first simulation was helpful, but didn't cover all possibilities. I tested the "first largest amount" and "first smallest" variants, where all destinations with varying amount of passengers are served by one line. I can't attach any resulting data, as they would be a great number of charts - these show how the amounts progress, and interpreting them is "human only" - which lines rise steadily (no serving), if the highest one changes etc.

I tried to simulate "corner cases" when the transport capacity is more or less as much as needed. Of course with too many or too few vehicles it degenerates to all waiting or all transported :)

Smallest first leads to smaller serving of the fastest rising amounts, so there are a few destinations literally exploding, and the rest oscillates in negligible amounts, compared to these.

Largest first has exactly opposite effect - it equalizes amounts of waiting cargo, so the numbers visible in station are all the same. However, the smallest rising destinations never reach the top, and thus just rise with the rest, never transported.

I don't know what it means for the discussion...

MATLAB source:

¨% test for Simutrans - passenger transport

cycles = 20; % how many periods
dests = 5; % how many destinations
freq = 10; % how many "ticks" between transport arrives
capacity = 80; % how much can the transport take

data = zeros(dests, cycles * freq); % preallocate the stats

increase_var = rand(dests, 1) * 10; % coefficient, how much psg to different destinations

data(:, 1) = round(increase_var); % fill first row

for i = 2 : cycles * freq
    data(:, i) = data(:, i - 1) + round(rand(dests, 1) .* increase_var); % add more random psg
    if mod(i, freq) == 0 % transport has arrived
        remaining = capacity;
        j = dests;
        tmp = data(:, i);
        [foo, ind] = sort(tmp, 'descend'); % see below:
        % 'descend' -> smallest amount first (j iterating backwards!)
        % 'ascend' -> highest amount first
        % foo is redundant, only indexes are important
        while (remaining > 0) && (j > 0) % until vehicle full or station emptied completely
            k = ind(j); % true index in main data (and tmp, too)
            if tmp(k) >= remaining
                amt = remaining;
            else
                amt = tmp(k);
            end;
            data(k, i)= data(k, i) - amt;
            remaining = remaining - amt;
            j = j - 1;
        end;
    end;
end;

plot(data'); % oops, wrong direction of matrix... rotate


Next simulation... assign destinations distances and sort according to them.
EDIT: Hehe, no interesting results from this. Only that the last served stations have best chance to get crowded, which we knew before :-\

Maybe here the simulation should be different, more competing lines?

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Combuijs

QuoteMaybe here the simulation should be different, more competing lines?

Yes, because when there is only one line the loading order does not matter. The station gets overcrowded if vehicle capacity is too low, and if vehicle capacity is enough, then everyone will get transported.

The problems start with competing lines. If the vehicle capacity in total is enough, you still might get passenger starvation if you use the wrong loading order. Say you have two big cities B1 and B2 and one small city S (might be more than one).

Case 1:
B1 - S - B2 (train with intermediate stops)
B1 - B2 (express train)
In this case you want to load passengers in B1 for the first stop first in order to get an efficient express train

Case 2:
B1 - B2  - S
B1 - B2
In this case you want to load passengers in B1 for the last stop first in order to get an efficient intermediate stops train

Maybe you can simulate this. As I have said before, if vehicle capacity is sufficient then the variants with lowest or highest number of passengers first are not needed, as they can't be better.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



prissi

well, but knowing, that first stop loading first, I can adjust my schedule appropriately ...

isidoro

Very interesting... we have some facts now...

Quote from: VS on December 02, 2008, 11:12:34 AM
Hm... just to add something less subjective to discussion: time-based, serving oldest, equals fifo, which is by nature unsorted, except by its function & design, so it might win performance-wise (even over random?). Just append as it comes and it's already sorted as you want.

Though it is quicker, it requires more memory and, with caches and paging, more memory can also mean slower.  In simutrans, when new cargo arrives at a station, it is accumulated to the equivalent cargo already waiting at the station.  This, in my opinion, should stay as is for performance reasons.

Quote from: VS on December 02, 2008, 11:12:34 AM
Largest first has exactly opposite effect - it equalizes amounts of waiting cargo, so the numbers visible in station are all the same. However, the smallest rising destinations never reach the top, and thus just rise with the rest, never transported.

Wonderful.  I didn't think about that.  So the aging mechanism doesn't really work in some configurations.

I think that variations (derivatives) may play an important role.  For each of your program's cycles, there has been a variation in amounts (difference between what quantity was at the end and what quantity was at the beginning).  We want a situation in which the addition of all that differences are more or less the capacity of the lines serving that station.  Should those differences be taken into account to give priorities?

There is a situation similar to this that used to make me make a mistake when beginning playing simutrans.  If you don't pay attention to a station for some time, maybe that station gets 100000 passengers waiting, for instance.  Then, I used to buy a lot of vehicles to transport all those passengers.  But that is an error because when that surplus is exhausted, there are way too many vehicles for the necessities.  The important thing is not the number of passengers waiting but the comparison in a given time of the passengers added to the station and the passengers transported by the vehicles in that same period...

Sarrus

Quote from: colonyan on December 01, 2008, 01:22:41 PM
Forcing passengers behavior seems little odd from my view of this simutrans. I believe as one company,
they should treat customer evenly. Not prioritizing some of them to the interest of company.
Company should work to follow the customer's behavior.
In real life we choose the train depends of hour departure or arrival, time to travel and costs. With no time schedule it is impossible to implements something simulating that.
BTW: time schedule would be great ;]

z9999

One thing, what I said "take lower number waiting fitst" is like this.
Sorry, I have poor vocabulary in English, and couldn't explain well.

Think, why you made such a line instead of a direct line.
(But of cource, I don't need this.  :P )

isidoro

Seems interesting.  So, the algorithm would be like this:

Repeat until there are no more waiting goods:
    perDestination:=1+int(freeCapacity/possibleDestinations)
    for each possible destination:
        load up to perDestination cargo (there can be less)
        if vehicle is full: exit Repeat


The problem I see is that there may be too many loops in some cases...


jatypc

Quote from: isidoro on December 04, 2008, 02:03:55 AM
The problem I see is that there may be too many loops in some cases...

A reduction in the number of loops could be achieved if the number of destinations, for which there is some load is recorded: if you decrease possibleDestinations fast, thus increase perDestination fast, there are not many loops as the freeCapacity decreases fast. Of course, I do not know how complicated the directive "Count the number of destinations reachable by the train" is - if it is readily available, it is easy; if the goods are separated by their intermediate station (visible in the amount/via list of a station), it is also easy since one can consider only the list of intermediate stations. On the other hand, if it has to be recursively collected, it is too much work probably.


possibleDestinations = "Count the number of (intermediate) destinations reachable by the train, for which there is some load"

Repeat until there are no more waiting goods:
    perDestination:=1+int(freeCapacity/possibleDestinations)
    for each possible destination:
        load up to perDestination cargo (there can be less)
        if there is no more load to Destination: possibleDestinations = possibleDestinations - 1
        if vehicle is full: exit Repeat


valten

in real life, if you have 1000 pass waiting at a station and a bus with 100 free arrives, 100 people will board which means each person whatever its destination gets a 10% chance of boarding the bus (i understand we don't have enough information to make a fifo decision) - that also means that the mix of people boarding the bus should reflect the mix of people waiting at the station

Proposal 1 : passenger should board following the proportion of passengers waiting per destination

Proposal 2 : if this is not possible computation-wise, maybe one solution would be to at least randomize the station which is considered as the first, what i mean is : on a ABCDE schedule at stop A you randomize which stop you load passengers to between stations B,C,D,E, if you draw B then you load passengers as today, if you draw C then you load passengers for C then D then E then B, if you draw D then you load passengers for D then E then B then C... this would greatly improve the situation in towns and mitigate the express lines problem


+ this algorithm can be a parameter in the conf file to accomodate the playing style and the hardware


robofish

Quote from: valten on March 29, 2009, 06:28:17 PM
in real life, if you have 1000 pass waiting at a station and a bus with 100 free arrives, 100 people will board which means each person whatever its destination gets a 10% chance of boarding the bus (i understand we don't have enough information to make a fifo decision) - that also means that the mix of people boarding the bus should reflect the mix of people waiting at the station

Proposal 1 : passenger should board following the proportion of passengers waiting per destination
Support!
It would be great to have this implemented.
We won't have trains running empty only one station after an overcrowded main hub ...

dloddick

Hello I come from Hong Kong
and I would like to suggest something on route setting

As everybody knows that minimum load % can be set at designated stops
so that the vehicle would start when minimum load reaches.

How about introducing a function on setting an "All get off" function at a designated stop?

Example:
1. Stop A
2. Stop B
3. Stop C
4. Stop D ( All get off at this stop )

i.e. no matter a passenger going to which stop,they must first alight at Stop D and waiting for other route
buses

Though it sound impratical
but in some Hong Kong bus routes operate like that
so that buses can rush back to its original starting stop without any passengers
for high demand at that stop

I highly hope that Simutrans would hv this function as it helps to solve the problem of
passengers taking the bus all the time in circular rt

and faciltate the operation of high demand routes ...

I guess it's easy to hv this function as Simutrans hv full load for buses
so no load I guess is okay...

and then I don't need to manually press "no load" for the buses all the time ...

Thanks a lot

skreyola

I think this would be cool. I have had times in the past where I wanted this... it makes sense in ST for goods more than passengers: If I have two oil consumers and two oil producers, Rig A, Rig B, Plant C, and Plant D, and ships E, F, and G, with E going from A to C, F going from A to D, and G going from B to D, my network can get all fouled up with oil going from B to C, which I didn't want. A "Max 0" fill order would prevent snarling of interconnected networks like this.
And there are times when I have one stop that's generating more passengers than the rest of the line, and I want an extra bus to carry passengers only away from there, so this is a good idea, I think.
:support:
How hard would it be to implement?
--Skreyola
You can also help translate for your language with SimuTranslator.

prissi

It is easy in principle, just at the built up of the connection three this connection needs to be found only in one way.

skreyola

Quote from: prissi on June 02, 2010, 08:58:32 PM
It is easy in principle, just at the built up of the connection three this connection needs to be found only in one way.
Are you saying this is possible currently?
--Skreyola
You can also help translate for your language with SimuTranslator.

prissi

The changes would not be very big; but personally I hate breaking the symmetric routing, since it will confuse poeple; I rather keep simutrans simple, as it is already challenging enough for most.

sdog

Something to the same effect already works in simutrans-experimental, without having to unload

I describe it with an example:
Stops A, B, C, D.
You want to get passengers get away from Stop A, as it tends to crowd. Delivering to B, C and D. The bus should return quickly to A, without passengers for B and C (this happens in standard i think)

Now have a line 1: A-B-C-D->A
And a line 2: A-B-C-D-C-B->A

If service on line 2 is frequent enough and stop A is crowded, passengers for B and C will get of the bus and take line 2 two back to B and C. So on the trip back from D to A only passengers for A should be on board, who should get off.
As soon as line 2 gets to slow however, passengers rather do the roundtrip in over A in line 1.


Please correct me if i'm wrong!

jamespetts

I must confess, it has been so long since I dealt with the machinations of routing that I cannot quite recall the circumstances in which passengers will disembark from their current ride even if it goes to their preferred destination directly to catch another mode of transport to get them there. Certainly, they will in sufficiently extreme circumstances, but I think that there is a general preference to remain with their present mode of transport if it will take them to their destination - just as in real life.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

isidoro

In fact, I did something similar to this in one of my patches:
http://forum.simutrans.com/index.php?topic=1648.0

The patch provides a button to set the maximum load at a station besides the minimum load.  If you set the maximum load at a station to zero, you get the effect you are looking for.

Note that:

  • The patch is dated
  • The patch does other things in connection with QoS and overcrowding I was experimenting with at that time

dloddick

Quote from: sdog on June 02, 2010, 10:56:31 PM
Something to the same effect already works in simutrans-experimental, without having to unload

I describe it with an example:
Stops A, B, C, D.
You want to get passengers get away from Stop A, as it tends to crowd. Delivering to B, C and D. The bus should return quickly to A, without passengers for B and C (this happens in standard i think)

Now have a line 1: A-B-C-D->A
And a line 2: A-B-C-D-C-B->A

If service on line 2 is frequent enough and stop A is crowded, passengers for B and C will get of the bus and take line 2 two back to B and C. So on the trip back from D to A only passengers for A should be on board, who should get off.
As soon as line 2 gets to slow however, passengers rather do the roundtrip in over A in line 1.


Please correct me if i'm wrong!
emm...
What I want is ...
Line 1 passengers must get off at Stop D and the bus will "no load" at Stop D
so that the bus can go back to Stop A again without passengers

In reality, no passenger is allowed to take a bus which is displayed as " Private " or " Not in service", isn't it ?

Though now we can manually press "no load" after the bus leaving Stop C
and according to the routing, all passengers will get off at Stop D

so I would like to have an option to be set in the line management instead of manually pressing the "no load" button all the time

dloddick

Quote from: prissi on June 02, 2010, 10:38:29 PM
The changes would not be very big; but personally I hate breaking the symmetric routing, since it will confuse poeple; I rather keep simutrans simple, as it is already challenging enough for most.
I guess you misunderstand my point or I did not explain it clearly ...

I did want similar cases provided by sdog:
Now have a line 1: A-B-C-D->A
And a line 2: A-B-C-D-C-B->A

and I just want a "no load" button when setting stop D in line 1
so that no passengers would remain in the bus after stop D

and on the other hand
line 2 would carry passengers back to C, B and A

then line 1 buses can quickly back to stop A again without passengers
this enhance efficiency of operating these two routes

In reality,
bus company would have buses going back to its original destination
for high demand also

You would not get on a bus showing " Private " or " Not in service "
and it is not allowed for passengers to take those buses

actually I don't tend to break the symmetric routing of Simutrans
but enhancing this routing using a better method to prevent overcrowding of some stops

You know
Adding more and more buses does not surely solving the problem of overcrowding
but may lead to lower efficiency due to congestion of buses

by the "no load" function
bus can "escape" from its terminus without passengers to its orginial starting point
and that surely enhancing the efficiency

I understand the Simutrans is created for everyone
it is hard to meet the needs of all people in the world
but as you say it is currently possible and therotically okay,
I cordially hope that you can add this option in the next version

ya,
anybody hv its right to use the option or not
but I think it would be rather selfish if one say "no" only for him won't use the option

and this option would further improve the simulation
of most vehicle transportation system,even train service would have additional departures when it come to the station without carrying any passengers

so could you please re-consider it again?
Adding this option would not cause great harm to most players
but would give a better simulation for players to operate their routes

jamespetts

Perhaps a more straightforward option would be to have the ability to set some stops as "embarkation only" and others as "disembarkation only". This is a common practice in reality on both 'buses and trains.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

He wants to have people change at said stop; thus disembarking only must be convoy specific.

jamespetts

Quote from: prissi on June 03, 2010, 08:55:58 AM
He wants to have people change at said stop; thus disembarking only must be convoy specific.

I'm not sure that I follow - why can't the disembark only setting be applied to a schedule of a line? Or have I misunderstood...?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

dloddick

Quote from: prissi on June 03, 2010, 08:55:58 AM
He wants to have people change at said stop; thus disembarking only must be convoy specific.
Not really
Using the example again:
Line 1: A>B>C>D>A
Line 2: A>B>C>D>C>B>A

firstly line 2 operates in normal mode
passenger can travel from:
A > D , B > D , C > D
A > B , B > C , A > C ( and vice versa )

In line 1: ( Assume that there is "no load" option set at Stop D )
passenger can travel like the following:
A > D , B > D , C > D
A > B , B > C , A > C

For opposite direction like D > C , C > A,
they must take line 2
as all line 1 passengers must get off at stop D
and nobody could get on the bus at stop D

Passenger direction: ( Forwards only no backwards )
A > B > C > D

Hope other can get what I mean
Thanks

skreyola

#65
Quote from: prissi on June 02, 2010, 10:38:29 PM
The changes would not be very big; but personally I hate breaking the symmetric routing, since it will confuse poeple; I rather keep simutrans simple, as it is already challenging enough for most.
I see your point, and I agree that simplicity is important, but I think it could be implemented without causing confusion, that is, it would be like power lines: nobody has to build them or deal with them if they choose not to.
Most people, I think, if they can understand the minimum load function, would understand a maximum load box right near it, and if they didn't, they'd probably leave it alone (in 100% max position).

Quote from: jamespetts on June 03, 2010, 09:04:53 AM
I'm not sure that I follow - why can't the disembark only setting be applied to a schedule of a line? Or have I misunderstood...?
Your wording could have been parsed to mean that the stop itself, not the stop in a schedule, was "embarkation only".

@dloddick: Okay, I understand, but why? Is it because you have one upstream line and one downstream line, or do you just not want passengers to go to those stops?
--Skreyola
You can also help translate for your language with SimuTranslator.

prissi

@skreyola
Maximum load was not, what was requested. It was a stop, where everybody must go off. It would be a station, that is connected by the other stations, but not connect to those.

skreyola

Quote from: prissi on June 03, 2010, 08:06:20 PM
@skreyola
Maximum load was not, what was requested. It was a stop, where everybody must go off. It would be a station, that is connected by the other stations, but not connect to those.
In that case, I misunderstood the OP.
--Skreyola
You can also help translate for your language with SimuTranslator.

Lmallet

Are we talking here about having Transport Tycoon's "Unload" button?  For those not familiar with TT, when you add a station in a vehicule's line management, you could select "Full Load" (equivalent to 100% in Simutrans), you could put nothing (so stop, load whatever cargo there is, and leave), or "Unload" (unload all cargo, and leave empty).  

From my TT memories, I rarely used the Unload feature (I don't even know if I ever used it)...  but that being said, TT didn't keep track of destination the way Simutrans does.  In TT, when a bus arrives at a station and unloads, it will "consume" all the passengers, as it simply assumes all passengers are going to that station.  In ST, passengers and cargo need to go somewhere, and might have to transfer at stations, and will try everything it can to make that happen.  There has been quite a few times I've noticed truck lines sitting idle, yet the factory continuously gets supplied.  Then I realize that a train, which is running an unrelated service, is actually feeding it when it returns from its destination, because a new industry built itself next to the "destination" station.   An Unload feature would be helpful in a case like this, because I could simply tell the train not to pick anything up on its way back, and allowing the trucks to do their work as intended.

I don't think this would make things more complicated;  after all, this would not happen by default, it would have to be selected.

skreyola

@Lmallet: Can't tell you how many times that has happened to me. That's why I support the addition of a feature for "unload only at this stop" in schedule creation... I don't think it should necessarily be "unload all"... now that I think about it, because that would make the feature less useful.
So, perhaps not a maximum, now that I think about it, but just a button for each stop in the line that forbids any loading at that point?
--Skreyola
You can also help translate for your language with SimuTranslator.