question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`Electric Cars` policy does not work as expected with ParkingAI enabled

See original GitHub issue

Describe the problem

It looks like ParkingAI does not ensure that spawned parked residents vehicle in the district with mentioned policy are only electric cars. I’ve checked the code and found other weird issues but still nothing which could explain that behavior.

Steps to reproduce

  1. Clear parked vehicles and preferably all passenger cars to despawn residents returning home in their “non-environment friendly” vehicles,
  2. Paint district and set Electric Cars policy
  3. From description and the game implementation, if citizen is at home and decided to spawn car it should be electric (final probability = random.Int(100) < 100 (forced probability when spawning vehicle at building located in the district with mentioned policy))

Notes

Maybe we should also try to force already spawned vehicles (and assigned to resident) to be electric, potential solutions:

  • reset assigned vehicle so it may decide again if want to use car,
  • swap it with electric when cim wants to use it

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
krzychu124commented, Apr 12, 2022
  • in the meantime while debugging Parking 😕

image

1reaction
krzychu124commented, Apr 11, 2022

Unrelated issue: reading the ParkingAI logs I noticed that TM:PE is trying to search parking spot when citizen exit its vehicle at outside connection (going outside), same for incoming citizens (just before they spawn at outside connection). Since usually there are no buildings then not a big deal but on the other hand, time is wasted for things that always fail…

Side note, maybe I don’t have enough car asset but I feel like once I created a small district in the corner with Electric Cars policy, 80% cars driving in the city are…electric. What is going on😂 ParkingAI logic for spawning vehicle when cim is at home seem to be a bit broken (or too restrictive) because when I disable ParkingAI there are loads of cars around high capacity residential buildings unlike near empty roadside parking lanes with ParkingAI enabled

Read more comments on GitHub >

github_iconTop Results From Across the Web

Policies to promote electric vehicle deployment
Near-term efforts must focus on continuing to make EVs competitive and gradually phasing out purchase subsidies as sales expand. This can be done...
Read more >
Electric Cars Won't Solve Climate Change
Suppose we fail to address climate change and the air pollution emissions from gas vehicles. In that case, we have significant problems looming: ......
Read more >
The 10 big problems with simply replacing fossil cars with ...
The aim is not to discredit electric cars as a sustainable technology (they can certainly avoid CO2 and reduce fossil fuel dependence). Instead, ......
Read more >
Electric Cars 101: The Answers to All Your EV Questions
In this look at EV questions, Consumer Reports answers common questions about electric vehicles and plug-in hybrids to help shoppers choose ...
Read more >
Charging into the future: the transition to electric vehicles
The vehicle electrification trend is expected to generate demand for labor in three main areas: the design and development of electric vehicle ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found