Engine-Specific (OdeEngine)

Having defined the agnostic parameters of the Pendulum, we can now specify the engine-specific implementations. In this case, we will create an implementation for the *OdeEngine*.

ode_engine

Engine-specific implementations can be created by adding a method to an Object, e.g. example_engine(). Here we will define which EngineNode and EngineState will be used for which actuators, sensors and states. In our case, we will use the OdeParameters and OdeEngineState (which are defined here) for the model_parameters and model_state states, respectively. We will use the OdeOutput, ActionApplied and OdeInput (which are defined here) for the pendulum_output sensor, the action_applied and pendulum_input actuators, respectively. Also, the image sensor will render the pendulum. For this, we will make use of the PendulumImage engine_node (which is defined here). For creating these states and nodes, we use the make() and make() methods. Furthermore, we specify where the ODE of the pendulum can be found (which is defined here). Finally, after creating these nodes, we construct an EngineGraph using these nodes by connecting them to each other.