The International Simutrans Forum

 

Author Topic: Taxi-Cab Company  (Read 2499 times)

0 Members and 1 Guest are viewing this topic.

Offline wlindley us

  • Devotee
  • *
  • Posts: 975
    • Hacking for fun and profit since 1977
  • Languages: EN, DE
Taxi-Cab Company
« on: November 16, 2011, 09:17:17 PM »
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!
« Last Edit: November 18, 2011, 09:26:03 AM by fabio »

Offline greenling

  • Lounger
  • *
  • Posts: 1728
  • Simutransarchology it my hobby!
  • Languages: DE,EN
Re: Possible if taxis are made as buses?
« Reply #1 on: November 16, 2011, 09:27:15 PM »
wlindley
i do look after modells for taxis!

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Taxi-Cab Company
« Reply #2 on: November 18, 2011, 09:43:10 AM »
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

Offline stmaker

  • *
  • Posts: 215
  • am lost noaw.
Re: Taxi-Cab Company
« Reply #3 on: November 18, 2011, 11:04:28 AM »
Awesome.

I'll try to prepare the taxis. need to try my vehicle-making skills first. :)

Offline wlindley us

  • Devotee
  • *
  • Posts: 975
    • Hacking for fun and profit since 1977
  • Languages: EN, DE
Re: Taxi-Cab Company
« Reply #4 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.

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

Offline stmaker

  • *
  • Posts: 215
  • am lost noaw.
Re: Taxi-Cab Company
« Reply #5 on: November 18, 2011, 01:31:58 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. ;)

Offline ojii

  • *
  • Posts: 149
  • Languages: EN, DE, JA
Re: Taxi-Cab Company
« Reply #6 on: November 18, 2011, 01:39:28 PM »
It would be kinda cool to see a loaded Eurostar arrive at the station, followed by a flurry of taxicabs departing...

THIS!

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4589
  • Languages: EN, DE, AT
Re: Taxi-Cab Company
« Reply #7 on: November 18, 2011, 01:44:09 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?

Offline ojii

  • *
  • Posts: 149
  • Languages: EN, DE, JA
Re: Taxi-Cab Company
« Reply #8 on: November 18, 2011, 01:46:36 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?

Offline transporter

  • *
  • Posts: 136
Re: Taxi-Cab Company
« Reply #9 on: November 18, 2011, 03:04:22 PM »
Great idea. Would be a cool new (large) addition to the game

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: Taxi-Cab Company
« Reply #10 on: November 18, 2011, 03:39:31 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

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1392
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Taxi-Cab Company
« Reply #11 on: November 18, 2011, 03:53:24 PM »
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!