#NEWLINE# def _dsdt( self , s_aug , t ) : #NEWLINE# #INDENT# s = np . zeros ( 4 ) #NEWLINE# s [ 0 ] = s_aug [ StateIndex . X ] #NEWLINE# s [ 1 ] = s_aug [ StateIndex . X_DOT ] #NEWLINE# s [ 3 ] = ( pi - s_aug [ StateIndex . THETA ] ) #NEWLINE# s [ 2 ] = ( - s_aug [ StateIndex . THETA_DOT ] ) #NEWLINE# a = s_aug [ 4 ] #NEWLINE# ds = self . _ode ( ds_aug , t , a , self . MASS_PEND , self . LENGTH , self . MASS_CART , self . B ) #NEWLINE# ds_aug = s_aug . copy ( ) #NEWLINE# ds_aug [ StateIndex . X ] = ds [ 0 ] #NEWLINE# ds_aug [ StateIndex . X_DOT ] = ds [ 1 ] #NEWLINE# ds_aug [ StateIndex . THETA_DOT ] = ds [ 2 ] #NEWLINE# ds_aug [ StateIndex . THETA ] = ds [ 3 ] #NEWLINE# return ds_aug