Open jakobaxelsson opened 1 year ago
A module dynamics has been added. It currently contains declaration and access to state variables. Actuation variables could be added as well, and these could be set by act. The dynamics then becomes a function from current state variables and actuation variables, to new values of the state variables.
Since the agent act function is only called when the pre-conditions are true, it might be useful to have also a no_act function, which is called when they are false. Alternatively, provide a boolean argument to act, and pass the pre-condition to it. It should then be called always. As an example, if the actuation in vehicles are changed to speed and heading, the speed should be set to 1 if preconditions are met, and 0 otherwise.
Some state variables may require special treatment. An example is pos, which is changed by the space move function. To handle this, it might be necessary to define pos as a property rather than an attribute, and let its set function call space move.
In a SoS, many elements are physical, which means that they have a material state and some dynamic relations that describe how states change over time. Many SoS agents (constituent systems) also have a physical representation, in addition to its mental capabilities. To capture this, a class of physical entities is needed.
As an example, a vehicle is a physical entity that has position, speed and heading. The driver can affect acceleration and steering angle, and this is fed into the dynamic relations to update the vehicle state.
Another example is the loads carried by vehicles. This could have physical properties, that change over time, such as deteriorating quality of food. Further examples include weather, or forest fires. All these are purely physical, and not social, but can still be affected by the social agents.
It is probably necessary to represent the nature of physical objects and socio-physical agents in the code to give the desired generality.