Closed RCura closed 8 years ago
Hi,
It already works, since experiments are species, but neither the outputs or inputs (parameters) are inherited, which effectively limits seriously the interest of doing so.
I will try to come up with a solution soon.
Cheers Alexis
On a second thought, it would be even more usefull to have the i/o as attributes of the experiment agent, as this would also allow to easily save their values to a csv/inspect them on a batch/headless model.
Having them as pure attributes would be a bit confusing, I guess, and difficult to manage, as their names can contain spaces.
However, I would be in favor of introducing several attributes (in line with gama-platform/gama2#9 ), like parameters
, displays
, monitors
, inspectors
, which would be maps (where the key would be the name of the item as declared by the user and the value its current value -- we have to decide what this 'value' would be for displays, however, but since gama-platform/gama2#9 plans to add commands for displays, I guess the display object (i.e. the drawing surface) should be the value).
So there are basically two things to do right now:
The first enhancement has been implemented and I have added the second to gama-platform/gama2#9. Parameters are now inherited (an info marker is added if they are redefined, and a compilation error raised if they are incompatible -- different types, etc.). Outputs are also inherited (both normal and permanent ones). In case they are defined in both experiments, they are merged with priority given to the redefinition. An info marker is also added in case of redefinition.
That's a very nice enhancement Alexis, thanks for it :)
I think this could be usefull to manage a lot of experiments, wether it's GUI or batch.
This would allow to have some common parameters/displays in a "base experiment", and to have some variations of this experiment to change values/outputs for each use case.
For example, could be something like this :