a-b-street / a-b-street/abstreet
Cyclists should use empty parking lanes
- Linguagem predominante
- Rust
- Estrelas
- 8.2k
- Forks
- 380
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
Start simple: if the lane is totally empty when the cyclist has to pick a turn, then use it. We could either "lock it" while the cyclist is there and force anybody trying to park to go a bit farther, or just allow it and not attempt to model any conflict between the cyclist and an actively parking car.
But this already gets interesting... how should this concept be exposed at the `map_model` layer? Should there be a `Turn`? How do methods like `constraints.can_use` and `map.get_turns_from_lane` handle this? Considering the parking lane for routing could be strange -- what if we have a one-way road with parking on both sides. We don't want a bike to route contraflow.
One approach to side-step this complexity is to treat it as a special case in `opportunistically_lanechange` at the routing level, which needs to change anyway to check the parking state. Still some parts of the sim layer will need to lookup the turn... could it be worth some kind of lazy instantiation there? Or a concept of virtual turns?
And then at the sim layer, do we lazily create a `Queue` for the parking lane once it's first used? Is it worth trying to garbage collect this when no agents are on it?
(The answers to some of these questions could potentially be useful for someday modeling time-based turn restrictions)
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
The issue discusses changes to the `map_model` layer, methods like `constraints.can_use` and `map.get_turns_from_lane`, and the `opportunistically_lanechange` routing logic. Start by examining the codebase for these components to understand the current lane and turn modeling. Look for how parking lanes are represented and how cyclists currently select lanes. Determine if a `Turn` object or a virtual turn concept needs to be introduced, and consider lazy instantiation of a `Queue` for the parking lane at the sim layer.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- rust
- Domínio
- game-dev
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100