Skip to content

MessagingUnit, receive() error #18

@Jun0929

Description

@Jun0929

Hi,
I tried to run the codes, but I bumped into 2 problems.

First, an error occured saying that QBIMIntersectionManager requires MessagingUnit as an argument.
I fixed this by just importing MessagingUnit and put MessagingUnit in QBIMIntersectionManager
like -
"from intersection_control.core import IntersectionManager, MessagingUnit",
"intersection_managers = {QBIMIntersectionManager(intersection_id, env, 10, 0.05, MessagingUnit) for intersection_id in env.intersections.get_ids()}"

Second, in the loop -
for vehicle in vehicles:
vehicle.step()
and
for intersection_manager in intersection_managers:
intersection_manager.step()
and the error says "receive() missing 1 required positional argument: 'self'".

I tried to fix this error, but I couldn't.
Can you help me to solve it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions