gemseo / core

Hide inherited members

monitoring module

Monitoring mechanism to track GEMSEO execution (update events).

class gemseo.core.monitoring.Monitoring(*args, **kwargs)[source]

Bases: object

This class implements the observer pattern.

It is a singleton, it is called by GEMSEO core classes like MDODicipline whenever an event of interest like a status change occurs. Client objects register with add_observer and are notified whenever a discipline status change occurs.

Parameters:
  • scenario – The scenario to be monitored.

  • args (Any) –

  • kwargs (Any) –

Return type:

Any

add_observer(observer)[source]

Register an observer object interested in observable update events.

Parameters:

observer – The object to be notified.

Return type:

None

get_statuses()[source]

Get the statuses of all disciplines.

Returns:

These statuses associated with the atom ids.

Return type:

dict[str, str]

remove_all_observers()[source]

Unsubscribe all observers.

Return type:

None

remove_observer(observer)[source]

Unsubscribe the given observer.

Parameters:

observer – The observer to be removed.

Return type:

None

update(atom)[source]

Notify the observers that the corresponding observable object is updated.

Observers have to know what to retrieve from the observable object.

Parameters:

atom – The updated object.

Return type:

None

instances: ClassVar[dict[tuple[int, int], Any]] = {(94321716006448, 139954597684944): <gemseo.core.monitoring.Monitoring object>}