예제 #1
0
    def plot_trajectory(self, sys, params='xu'):
        """  """

        sim = simulation.Simulation(sys, self.time_final, self.time_steps)

        sim.x_sol = self.x_sol
        sim.t = self.t_sol
        sim.u_sol = self.u_sol

        sim.plot(params)

        sys.sim = sim
예제 #2
0
 def compute_trajectory(self , x0 , tf = 10 , n = 10001 , solver = 'ode'):
     """ 
     Simulation of time evolution of the system
     ------------------------------------------------
     x0 : initial time
     tf : final time
     
     """
     
     self.sim = simulation.Simulation( self , tf , n , solver )
     self.sim.x0 = x0
     self.sim.compute()
예제 #3
0
 def plot_phase_plane_trajectory(self , x0, tf=10, x_axis=0, y_axis=1):
     """ 
     Simulates the system and plot the trajectory in the Phase Plane 
     ---------------------------------------------------------------
     x0 : initial time
     tf : final time
     x_axis : index of state on x axis
     y_axis : index of state on y axis
     
     """
     
     self.sim = simulation.Simulation( self , tf )
     
     self.sim.x0 = x0
     self.sim.compute()
     self.sim.phase_plane_trajectory( x_axis , y_axis )