This is a simulation framework I have created to try and determine what an effective model-based simulation framework might look like in the modern era of programming.
In any model-based simulation, it is vital that models can reference each other, either to set values or read them. This task is to implement an architecture that can be used to connect different models together.
Likely, this can be implemented with the following steps:
When models are generated, they are put in a hash map with their name and their corresponding pointer location.
When models are generated, any fields requiring references are set to an empty model that just contains the name of the object to point to.
After all models are generated, the empty reference models are replaced with the model pointer which carries the same name.
This infrastructure will require some error messages, including when a model does not exist.
Furthermore, it is important we avoid memory leaks by reference cycles. Read the problem and then the solution to learn how to avoid this.
In any model-based simulation, it is vital that models can reference each other, either to set values or read them. This task is to implement an architecture that can be used to connect different models together.
Likely, this can be implemented with the following steps:
This infrastructure will require some error messages, including when a model does not exist.
Furthermore, it is important we avoid memory leaks by reference cycles. Read the problem and then the solution to learn how to avoid this.