1
0
-1

I'm looking at a scenario where a vehicle is available to take members of a household to their activities with or without members of the household inside. So, like a chauffeur or a household-owned automated vehicle. 

It seems that the existing taxi module would work for this, if I could restrict the taxi to only being available to a set of individual ID's. Any ideas on how I might go about implementing this?

    CommentAdd your comment...

    4 answers

    1.  
      2
      1
      0

      Hi Greg,

      great to hear from you!

      I would also understand it the way Michal proposes.

      I've implemented something similar where a certain person group (in our case: wheelchair users) can only get a certain type of taxi. 

      The priniciple, however, is the same (IDs of passengers and taxis are matched). For an idea how to implement this, see:

      https://github.com/matsim-org/matsim/blob/f83ea1d00a0e00d79cdeb6328393e9d5c09d0e03/playgrounds/jbischoff/src/main/java/playground/jbischoff/taxi/inclusion/optimizer/InclusionIdleTaxiZonalRegistry.java


      To see how it is all plugged together, there is a Run script https://github.com/matsim-org/matsim/tree/f83ea1d00a0e00d79cdeb6328393e9d5c09d0e03/playgrounds/jbischoff/src/main/java/playground/jbischoff/taxi/inclusion


      Good luck,

      Joschka


      1. Gregory Macfarlane

        Hi Joschka! I'll definitely have a look at what you've done; it seems like a melding of Michal's and Kai's, where you dispatch taxis only to a particular subpopulation.

      CommentAdd your comment...
    2.  
      2
      1
      0

      An alternative might be to use "subpopulations".  With that, you could have some agents have "taxi" or "av" as mode alternative, and others not.

       RunSubpopulationsExample contains an example of how to use subpopulations in Java.  One can use subpopulations also from files only (i.e. without programming java), but I don't think that you can use different sets of mode by subpopulation from file only.

      1. Gregory Macfarlane

        In this case, I would need as many subpopulations as households with an AV; could this make the solution more complex than the Michal proposal?

      CommentAdd your comment...
    3.  
      2
      1
      0

      Hi Gregory,

      I would start with a slightly customised version of RuleBasedTaxiOptimizer that

      • does not pre-filter vehicles and requests based on their location (this is easy, just set the nearestRequestsLimit and nearestRequestsLimit parameters to a very large number, e.g. 9999999)
      • uses a different dispatch finder than the standard (and now the only) BestDispatchFinder; this however would require (a) creating a general interface like 'TaxiDispatchFinder', and then (b) adding a constructor to RuleBasedTaxiOptimizer that accepts any DispatchFinder, e.g. "OwnAVDispatchFinder", which you would then need to implement

      Please let me know if this is the way you would like to move on with your project/scenario. If yes, I can adapt the taxi code so that you can start coding your dispatching.

      Best,
      Michal 


      1. Gregory Macfarlane

        This definitely seems like the logical way forward. So, to be clear: I write an interface to the taxi optimizer that only dispatches taxis to individuals with a particular set of ID's? I guess I need to dig into the taxi code, then?

      2. Michal Maciejewski

        Yes, that would require some amount of coding. But the current taxi code is close to what you need, so I will prepare some extension points where you can easily plug your dispatching strategy. Will let you know when it is ready.

      CommentAdd your comment...
    4.  
      1
      0
      -1

      And yet another possibility: Add some penalty term to the scoring function for people using the "taxi" modes when they are not allowed to use it.  Examples with scoring functions are in RunSubpopulationsExample and RunExampleIndividualizedScoring.

      Given the nature of MATSim, this may be the easiest way to do this.  But also given the nature of MATSim, you will probably always have a small number of "disallowed" agents trying the "taxi" mode in spite of the high penalty.

      1. Gregory Macfarlane

        I see this as a way to keep people from using taxis in general, but what I hope to do is model a household-owned AV, so there will be a vehicle that only two or three people have access to at all. Other households may have their own AV's, but the "taxi" and the household are linked.

      CommentAdd your comment...