Package modelarium
Class Model
java.lang.Object
modelarium.Model
Main class for executing an agent-based model using multithreaded execution.
This class is responsible for configuring the environment, distributing agents across worker threads, running the simulation (synchronously or asynchronously), and collecting results.
-
Constructor Summary
ConstructorsConstructorDescriptionModel(ModelSettings settings) Constructs a new model instance with the specified settings. -
Method Summary
-
Constructor Details
-
Model
Constructs a new model instance with the specified settings.- Parameters:
settings- the settings to use for model initialisation and execution
-
-
Method Details
-
run
public Results run() throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessExceptionRuns the agent-based model according to the configured settings.- Returns:
- a
Resultsobject containing accumulated simulation data - Throws:
NoSuchMethodException- if the results class has no default constructorInvocationTargetException- if constructor invocation failsInstantiationException- if instantiating the results class failsIllegalAccessException- if the constructor is not accessible
-