예제 #1
0
    def evaluate(self, theta, u_P, n,
                 t):  #    manjka se tretja komponenta od produkta n.t
        """
        Function calculate values in predefined zero matrix
        """
        dt_ds = d_ds(t)
        self.matrix[0:2] = self._sign * np.dot(A_matrix(theta), dt_ds)

        #    body i
        if self.id == 0:
            _theta_i = theta
            _t_i = d2_ds2(t)
            _theta_j = self._parent.body_list[1].theta[2]
            _n_j = self._parent._n_list[1]
            self.matrix[-1] = self._sign * np.dot(
                np.dot(A_2theta_matrix(_theta_i), _t_i),
                np.dot(A_matrix(_theta_j), _n_j))

        #    body j
        elif self.id == 1:
            _theta_i = self._parent.body_list[0].theta[2]
            _t_i = self._parent._t_list[0]
            _theta_j = theta
            _n_j = d2_ds2(n)
            self.matrix[-1] = self._sign * np.dot(
                np.dot(A_matrix(_theta_i), _t_i),
                np.dot(A_2theta_matrix(_theta_j), _n_j))
예제 #2
0
    def evaluate(self, theta, u_P, n, t):
        """
        
        """
        self.matrix[0:2, -1] = self._sign * np.dot(A_2theta_matrix(theta), u_P)

        #    body i
        if self.id == 0:
            _theta_i = theta
            #    second partial derivative of t_i with respect to s_i
            _d2t_i_ds2_i = d2_ds2(t)
            _theta_j = self._parent.body_list[1].theta[2]
            _n_j = self._parent._n_list[1]
            self.matrix[-1, -1] = self._sign * np.dot(
                np.dot(A_2theta_matrix(_theta_i), _d2t_i_ds2_i),
                np.dot(A_matrix(_theta_j), _n_j))

        #    body j
        elif self.id == 1:
            _theta_i = self._parent.body_list[0].theta[2]
            _t_i = self._parent._t_list[0]
            _theta_j = theta
            #    second partial derivative of n_j with respect to s_j
            _d2n_j_ds2_j = d2_ds2(n)
            self.matrix[-1, -1] = self._sign * np.dot(
                np.dot(A_matrix(_theta_i), _t_i),
                np.dot(A_2theta_matrix(_theta_j), _d2n_j_ds2_j))
예제 #3
0
    def evaluate(self, theta, u_P, n, t):  #    manjka se tretja komponenta od produkta n.t
        """
        Function calculate values in predefined zero matrix
        """
        dt_ds = d_ds(t)
        self.matrix[0:2] = self._sign * np.dot(A_matrix(theta), dt_ds)

        
        #    body i
        if self.id == 0:
            _theta_i = theta
            _t_i = d2_ds2(t)
            _theta_j = self._parent.body_list[1].theta[2]
            _n_j = self._parent._n_list[1]
            self.matrix[-1] = self._sign * np.dot(np.dot(A_2theta_matrix(_theta_i), _t_i), np.dot(A_matrix(_theta_j), _n_j))
        
        #    body j
        elif self.id == 1:
            _theta_i = self._parent.body_list[0].theta[2]
            _t_i = self._parent._t_list[0]
            _theta_j = theta
            _n_j = d2_ds2(n)
            self.matrix[-1] = self._sign * np.dot(np.dot(A_matrix(_theta_i), _t_i), np.dot(A_2theta_matrix(_theta_j), _n_j))
예제 #4
0
 def evaluate(self, theta, u_P, n, t):
     """
     
     """
     self.matrix[0:2, -1] = self._sign * np.dot(A_2theta_matrix(theta), u_P)
     
     #    body i
     if self.id == 0:
         _theta_i = theta
         #    second partial derivative of t_i with respect to s_i
         _d2t_i_ds2_i = d2_ds2(t)
         _theta_j = self._parent.body_list[1].theta[2]
         _n_j = self._parent._n_list[1]
         self.matrix[-1, -1] = self._sign * np.dot(np.dot(A_2theta_matrix(_theta_i), _d2t_i_ds2_i), np.dot(A_matrix(_theta_j), _n_j))
     
     #    body j
     elif self.id == 1:
         _theta_i = self._parent.body_list[0].theta[2]
         _t_i = self._parent._t_list[0]
         _theta_j = theta
         #    second partial derivative of n_j with respect to s_j
         _d2n_j_ds2_j = d2_ds2(n)
         self.matrix[-1, -1] = self._sign * np.dot(np.dot(A_matrix(_theta_i), _t_i), np.dot(A_2theta_matrix(_theta_j), _d2n_j_ds2_j))