gama.old icon indicating copy to clipboard operation
gama.old copied to clipboard

Enhancement: Add attributes and actions to experiment agents

Open ptaillandier opened this issue 10 years ago • 3 comments

In GAMA, an experiment is an agent and as other agents can have attributes and actions. A powerful way to improve the simulation experience and possibility (in particular for participatory simulation) could consist in giving to experiment agents some built-in attributes and actions.

List of attributes:

  • selected agents,
  • dragged agents,
  • frontmost display,
  • list of displays,

List of actions:

  • refresh,
  • bring to top,
  • close,
  • open,
  • warn

If you have ideas of other attributes and actions, fill free to complete these lists.

ptaillandier avatar Jun 29 '15 13:06 ptaillandier

Completely agree with this one.

Experiments should be provided, at least, with possibilities for manipulating outputs (and esp. displays).

refresh / close / open (incl. reopen) / pause / synchronize / bring to front / send to back for all outputs. (+ corresponding query operators, like paused(…) and corresponding attributes) zoom(float or geometry) / focus(agent) / highlight(agent) / select(agents) / overlay(bool) / snapshot(point) for displays

Plus we can probably allow some output statements to be reusable in actions/reflexes of experiments, like inspect / display for creating dynamic outputs (allowing both a declarative approach in the output section and a more procedural one in the experiment itself).

AlexisDrogoul avatar Dec 30 '15 08:12 AlexisDrogoul

Here is a list of the statements that are / will be available in experiments: string arguments represent the name of an output, list<string> a set of names.

  • [ ] focus_on(agent | geometry), inspect(agent | list<agent>) and highlight(agent) have been implemented in #1871 as statements -- should they become actions instead, only available in experiments ?
  • [ ] refresh_outputs(bool) and refresh(string | list<string>, bool) for forcing the refresh of outputs if true, pausing them if false. refresh(string | list<string>, int) can also be implemented to define the frequency
  • [ ] zoom_to(string | list<string>, float) to zoom a display to a given scale in percentage, zoom_by(string | list<string>, float) to apply a certain zoom factor
  • [ ] synchronize_outputs(bool) and synchronize(string | list<string>, bool) for (de)synchronizing outputs
  • [ ] focus_on(string | list<string>, agent|geometry) to focus only in a display
  • [ ] hide(string | list<string>) and show(string | list<string>) to respectively open and close the views of existing outputs
  • [ ] bring_to_front(string | list<string>) to bring the corresponding output(s) to front

Regarding new operators, here is the list of the ones that will be made available:

  • [ ] is_paused(string) -> bool to know if an output is paused
  • [ ] is_synchronized(string) -> bool to know if an output is synchronized
  • [ ] is_open(string) -> bool to know if an output is currently opened
  • [ ] is_closed(string) -> bool to know if an output has been closed
  • [ ] is_in_front(string) -> bool to know if an output view is in front
  • [ ] zoom_level(string) -> float the current zoom level of a given display (corresponds to the #zoom_level available in the context of the display)

Regarding new variables, here is the tentative list:

  • [ ] monitors the list of monitors names currently open
  • [ ] displays the list of display names currently open
  • [ ] inspectors the list of inspectors/browsers currently open

I will implement these new items progressively (as it represents a quite considerable change in the relationships between experiments and their outputs). Another problem is the one raised by multi-simulations, where the outputs corresponding to one simulation have the same name as the others.

If anyone has suggestions or ideas or proposals...

AlexisDrogoul avatar Aug 02 '16 15:08 AlexisDrogoul

Another attribute (taken from #1677):

  • [ ] parameters a map of parameter names and values

AlexisDrogoul avatar Aug 04 '16 06:08 AlexisDrogoul