(self, policy, include_initial=True)
return v_dot_negative
Return the safe set for a given policy.

        Parameters
        ----------
        policy : ndarray
            The policy used at each discretization point.
        include_initial : bool, optional
            Whether to include the initial safe set.

        Returns
        -------
        constraint : ndarray
            A boolean array indicating where the safety constraint is
            fulfilled.
Return the safe set for a given policy.
Return the safe set for a given policy .
def safety_constraint(self, policy, include_initial=True):
        """Return the safe set for a given policy.

        Parameters
        ----------
        policy : ndarray
            The policy used at each discretization point.
        include_initial : bool, optional
            Whether to include the initial safe set.

        Returns
        -------
        constraint : ndarray
            A boolean array indicating where the safety constraint is
            fulfilled.

        """
        prediction = self.dynamics(self.discretization, policy)
        v_dot_bound = self.v_decrease_bound(self.discretization, prediction)

        # Update the safe set
        v_dot_negative = v_dot_bound < self.threshold

        # Make sure initial safe set is included
        if include_initial and self.initial_safe_set is not None:
            v_dot_negative[self.initial_safe_set] = True

        return v_dot_negative
def safety_constraint ( self , policy , include_initial = True ) : prediction = self . dynamics ( self . discretization , policy ) v_dot_bound = self . v_decrease_bound ( self . discretization , prediction ) # Update the safe set v_dot_negative = v_dot_bound < self . threshold # Make sure initial safe set is included if include_initial and self . initial_safe_set is not None : v_dot_negative [ self . initial_safe_set ] = True return v_dot_negative