Skip to content

Give processor, feed manufacturers and feed traders one agent list per entity #48

Description

@Hackatro

Problem

In topology._DECLARED_ARCHETYPES, the processor, feed manufacturer and feed trader kinds use a hardcoded list name (processors, feed_manufacturers, feed_traders).
Every PDL entity of that kind lands in that one list, and model.setup() creates one agent per list. A PDL with two processors would give one agent that represents neither entity.

Since #37, build_rosterraises a ValueErrorin this case instead of running with wrong results. So today these kinds support exactly one entity per PDL.

Change

Name these lists after their entity id, as #37 did for consumers. Then update everything that looks them up by the hardcoded name so it looks them up by role instead:

  • agent/process.py l.125-133
  • environment.py l.163

Remove the guard in build_roster.

Related: the adjustable agent-count feature (slider)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementFor everything that improves an already existing feature.simulation logicFor everything related to the internal simulation logic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions