-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the simulator_index implementation #384
Comments
I would argue that the simulator ID is not an inherent property of the simulator. It's a handle that the However, this fact is hidden from client code by the Right now, we don't support removal of subsimulators, so for the time being, |
The |
It has to be switched eventually.. EDIT: I see |
As a first step, can we agree on a new name for I propose |
If Edit: This was just a bad idea with the current design being centered around using lookup, |
This issue should have been resolved somehow by now. I think we were in agreement that Surely someone else must have an opinion on this? |
Currently, we assign an
id
to asimulator
when it's added to anexecution
. Thisid
is supposed to work as a unique identifier in order to identify the simulator in other function calls.However, the generation of this
id
is implemented like this:This obviously will not hold if a
simulator
should be removed and another one added.I see two solutions. Use a
referenceCounter
for generating theid
or use anuuid
. In both cases, we need to use amap
to store thesimulator
instances instead of avector
.The
uuid
could be an inherent property of thesimulator
instance. This would allow us to simplify calls where a reference/pointer to the actualsimulator
is passed.E.g
add_simulator
inalgorithm.hpp
:In either case
simulator_index
must be renamed, as it's not anindex
.I suggest
simulator_id
.The text was updated successfully, but these errors were encountered: