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)
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 aValueErrorin 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.pyl.125-133environment.pyl.163Remove the guard in
build_roster.Related: the adjustable agent-count feature (slider)