Package modelarium.attributes.results
Class AttributeSetCollectionResults
java.lang.Object
modelarium.attributes.results.AttributeSetCollectionResults
Holds the result containers for all
AttributeSet instances
associated with a single model element (e.g. an agent or the environment).
This class provides access to individual AttributeSetResults,
indexed both by name and position. It is created during model setup and
reused during each tick for recording attribute values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCloses and clears all result databases associated with this collection.intgetAttributeSetResults(int index) Retrieves the results object by index.getAttributeSetResults(String attributeSetName) Retrieves the results object for a given attribute set name.voidsetup(String modelElementName, List<AttributeSet> attributeSets) Prepares this result container for a given model element and its attribute sets.
-
Constructor Details
-
AttributeSetCollectionResults
public AttributeSetCollectionResults()
-
-
Method Details
-
setup
Prepares this result container for a given model element and its attribute sets.- Parameters:
modelElementName- the name of the owning agent or environmentattributeSets- the list of attribute sets to track results for
-
getAttributeSetResults
Retrieves the results object for a given attribute set name.- Parameters:
attributeSetName- the name of the attribute set- Returns:
- the associated
AttributeSetResults
-
getAttributeSetResults
Retrieves the results object by index.- Parameters:
index- the index of the attribute set- Returns:
- the corresponding
AttributeSetResults
-
getAttributeSetCount
public int getAttributeSetCount()- Returns:
- the number of attribute sets tracked in this collection
-
getModelElementName
- Returns:
- the name of the model element this result set belongs to
-
disconnectDatabases
public void disconnectDatabases()Closes and clears all result databases associated with this collection.This should be called when the simulation ends or when the data is no longer needed.
-