News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Taxi-Cab Company

Started by wlindley, November 16, 2011, 09:17:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wlindley

For Multiplayer, it might be possible to play entirely as a Taxi-Cab company.  That would require writing some code to emulate the operation of a taxi:

  • Instead of having a route of fixed Stops, you would designate one or more "stops" which would act as the taxi queue (taxi stand) where the taxi would wait (presumably at a rail stations, airport, or other traffic generator)
  • Once the taxi had picked up a single passenger (or perhaps 2 or 3 to the same destination) it would drive directly to that destination
  • After discharging its load, the taxi would make its way back to the next (or the single) "stop" on its schedule, while attempting to find a new load ("fare") on the way
  • If it finds a fare before it arrives at its next "stop," it will pick up that passenger (load) and drive directly to that person's destination (again, possibly carrying two or three from the same place to the same destination)
  • The addition of Radio Controlled Cabs would permit picking up passengers other than encountered solely between a passenger discharge point and the next "stop" on the route.

That would work equally well for "Jitney" bus services, of course.

And having to write non-trivial code like the above explains why we don't already have taxis in Simutrans!

greenling

wlindley
i do look after modells for taxis!
Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

Fabio

Split from: http://forum.simutrans.com/index.php?topic=3706.0

I like wlindley's suggestion, it's the most articulated I ever read about taxis. It's worth its own extension request.

Discussion about making taxi addons (for pak128) with existing code can go on here: http://forum.simutrans.com/index.php?topic=3706.0

stmaker

Awesome.

I'll try to prepare the taxis. need to try my vehicle-making skills first. :)
Version using: Simutrans v111.0
Paks: pak64, pak96.comic, pak128 openr582, pak128.Britain, pak128.Japan, pak192.comic
Using: Paint.NET, Paint, Photoshop, SketchUp
Future Addon(s): Building (Link)
Current Addon(s): Eye-See Mart and Several Building addons  Ask me any questions. I'm free.

wlindley

Perhaps the route and line dialogs could have a "destination" instruction called "Operate as taxi" which would engage the above behaviour.  You could set the route to be:

1. London King's Cross (50% full)
2. Operate as taxi
3. London Waterloo International (wait 1/16 month)
4. Operate as taxi

so the cab would wait at King's Cross for a passenger, then per the second instruction "ask" that passenger where he is going, choose that as a destination (adding it temporarily to the route list, just like Go To Depots currently do), go directly there, and discharge the passenger. 

A first pass at the code could stop there -- it does mean taxicabs would run empty back to their next destination (unless, perhaps, there happened to be someone waiting right there who wants to ride toward the next destination in the list).  Once all that is working, then possibly handle another temporary destination with a flag that means "Move to destination, while looking for walking person who is hailing cab from sidewalk" -- that would be engaged whenever transitioning from the "operate as taxi" and whenever the taxi has no passengers.

It would be kinda cool to see a loaded Eurostar arrive at the station, followed by a flurry of taxicabs departing...

stmaker

Quote from: wlindley on November 18, 2011, 01:20:24 PM
Perhaps the route and line dialogs could have a "destination" instruction called "Operate as taxi" which would engage the above behaviour.  You could set the route to be:

1. London King's Cross (50% full)
2. Operate as taxi
3. London Waterloo International (wait 1/16 month)
4. Operate as taxi

so the cab would wait at King's Cross for a passenger, then per the second instruction "ask" that passenger where he is going, choose that as a destination (adding it temporarily to the route list, just like Go To Depots currently do), go directly there, and discharge the passenger. 

A first pass at the code could stop there -- it does mean taxicabs would run empty back to their next destination (unless, perhaps, there happened to be someone waiting right there who wants to ride toward the next destination in the list).  Once all that is working, then possibly handle another temporary destination with a flag that means "Move to destination, while looking for walking person who is hailing cab from sidewalk" -- that would be engaged whenever transitioning from the "operate as taxi" and whenever the taxi has no passengers.

You sir are awesome. I love your idea. ;)
Version using: Simutrans v111.0
Paks: pak64, pak96.comic, pak128 openr582, pak128.Britain, pak128.Japan, pak192.comic
Using: Paint.NET, Paint, Photoshop, SketchUp
Future Addon(s): Building (Link)
Current Addon(s): Eye-See Mart and Several Building addons  Ask me any questions. I'm free.

ojii

Quote from: wlindley on November 18, 2011, 01:20:24 PMIt would be kinda cool to see a loaded Eurostar arrive at the station, followed by a flurry of taxicabs departing...

THIS!

Dwachs

Quote from: wlindley on November 18, 2011, 01:20:24 PM
so the cab would wait at King's Cross for a passenger, then per the second instruction "ask" that passenger where he is going, choose that as a destination (adding it temporarily to the route list, just like Go To Depots currently do), go directly there, and discharge the passenger. 
How to determine the range of the taxi? I mean, passengers to which destinations should take the particular taxi?
Parsley, sage, rosemary, and maggikraut.

ojii

Quote from: Dwachs on November 18, 2011, 01:44:09 PM
How to determine the range of the taxi? I mean, passengers to which destinations should take the particular taxi?

How about a (pakset?) setting to define the probability that a passenger will take a taxi for a distance of n. The chances should be very low if n is very low (they could walk) or very high (taxi is too expensive in real life).

EDIT: Maybe Log-Normal distribution where the setting defines the alpha value?

transporter

Great idea. Would be a cool new (large) addition to the game

ӔO

Quote from: Dwachs on November 18, 2011, 01:44:09 PM
How to determine the range of the taxi? I mean, passengers to which destinations should take the particular taxi?

surprisingly: http://www.taxi-driver.co.uk/phpBB2/viewtopic.php?f=1&t=17643
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

Combuijs

Yes, but that will be different in different countries. In England I recently took a taxi from Sheffield to Hope (15 miles?) which cost me about 20 pounds. In the Netherlands I would never do that, I would be broke!
Bob Marley: No woman, no cry

Programmer: No user, no bugs