(self, state, action)
return state_derivative
Compute the state time-derivative.

        Parameters
        ----------
        states: ndarray or Tensor
            Unnormalized states.
        actions: ndarray or Tensor
            Unnormalized actions.

        Returns
        -------
        x_dot: Tensor
            The normalized derivative of the dynamics
Compute the state time-derivative.
Compute the state time - derivative .
def ode(self, state, action):
        """Compute the state time-derivative.

        Parameters
        ----------
        states: ndarray or Tensor
            Unnormalized states.
        actions: ndarray or Tensor
            Unnormalized actions.

        Returns
        -------
        x_dot: Tensor
            The normalized derivative of the dynamics

        """
        # Physical dynamics
        gravity = self.gravity
        length = self.length
        friction = self.friction
        inertia = self.inertia

        angle, angular_velocity = tf.split(state, 2, axis=1)

        x_ddot = gravity / length * tf.sin(angle) + action / inertia

        if friction > 0:
            x_ddot -= friction / inertia * angular_velocity

        state_derivative = tf.concat((angular_velocity, x_ddot), axis=1)

        # Normalize
        return state_derivative
def ode ( self , state , action ) : # Physical dynamics gravity = self . gravity length = self . length friction = self . friction inertia = self . inertia angle , angular_velocity = tf . split ( state , 2 , axis = 1 ) x_ddot = gravity / length * tf . sin ( angle ) + action / inertia if friction > 0 : x_ddot -= friction / inertia * angular_velocity state_derivative = tf . concat ( ( angular_velocity , x_ddot ) , axis = 1 ) # Normalize return state_derivative