forked from stpaine/FERS
-
Notifications
You must be signed in to change notification settings - Fork 1
World Entity Management
David Young edited this page Apr 30, 2025
·
1 revision
This capability describes how the World class manages the primary actors or entities within the simulation. It acts as a central container, storing collections of Platform, Transmitter, Receiver, and Target objects. These entities are typically added to the World during the simulation setup phase, based on the configuration provided (e.g., parsed from an XML scenario file).
- Assumes entities are added to the
Worldviastd::unique_ptr, transferring ownership to theWorldcontainer. - Assumes entities are added before the main simulation loop begins.
- Assumes the order in which entities are added generally does not impact the simulation logic, unless subsequent processing explicitly relies on the iteration order of the retrieved lists.
- Assumes these core entity collections remain constant (no additions, removals, or modifications) after the initial setup phase is complete, with the notable exception of entities added during multipath initialization.
-
Static Entity Collection: Once the initial setup (and potential multipath initialization) is complete, there are no public methods provided by the
Worldclass to dynamically add, remove, modify, or query individual entities (e.g., find a specific Target by name). Access is typically limited to retrieving the entire list of a given entity type. -
Container Role: The
Worldprimarily serves as a static container for these entities during the main simulation run, facilitating access for simulation loops but not active management.
-
Classes:
World,Platform,Transmitter,Receiver,Target -
Methods:
World::add(std::unique_ptr<Platform>),World::add(std::unique_ptr<Transmitter>),World::add(std::unique_ptr<Receiver>),World::add(std::unique_ptr<Target>) -
Internal Data:
World::_platforms,World::_transmitters,World::_receivers,World::_targets(private member vectors storing the entities) -
Wiki Pages: World Multipath Initialization (as it modifies entity lists), XML Parsing (responsible for calling
World::add)
-
Needs Verification: While fundamental, the process of adding entities and the immutability of the lists post-setup (except for multipath) should be explicitly verified. Ensure
unique_ptrownership semantics are handled correctly throughout. Confirm behavior if configuration attempts invalid additions (though likely caught during parsing). -
Key Areas for Validation:
- Confirm successful addition of all entity types (
Platform,Transmitter,Receiver,Target). - Verify that entity lists retrieved via getter methods accurately reflect the added entities.
- Ensure lists are correctly modified (only) during the
World::processMultipathstep if multipath is enabled. - Confirm that no other simulation logic attempts to modify these core lists after setup.
- Confirm successful addition of all entity types (
- Priority: Low (Core functionality, likely stable, but foundational)