/// <summary>
 /// Construct with the provided model update timestep increment (tau), and initial model state.
 /// </summary>
 /// <param name="tau">The timestep increment, e.g. 0.01 for 10 millisecond increments.</param>
 /// <param name="state">The cart-pole model state variables.</param>
 public CartDoublePolePhysics(double tau, double[] state)
 {
     Debug.Assert(state.Length == 6);
     _tau       = tau;
     _state     = state;
     _equations = new CartDoublePoleEquations();
 }
Example #2
0
 /// <summary>
 /// Construct with the provided model update timestep increment (tau), initial model state, and equations of motion and parameters.
 /// </summary>
 /// <param name="tau">The timestep increment, e.g. 0.01 for 10 millisecond increments.</param>
 /// <param name="state">The cart-pole model state variables.</param>
 /// <param name="equations">The model equations of motion, and parameters.</param>
 public CartDoublePolePhysicsRK2(
     double tau,
     double[] state,
     CartDoublePoleEquations equations)
     : base(tau, state, equations)
 {
 }
Example #3
0
 /// <summary>
 /// Construct with the provided model update timestep increment (tau), initial model state, and equations of motion and parameters.
 /// </summary>
 /// <param name="tau">The timestep increment, e.g. 0.01 for 10 millisecond increments.</param>
 /// <param name="state">The cart-pole model state variables.</param>
 /// <param name="equations">The model equations of motion, and parameters.</param>
 public CartDoublePolePhysicsRK4(
     double tau,
     double[] state,
     CartDoublePoleEquations equations)
     : base(tau, state, equations)
 {
     _tau_half = _tau / 2.0;
 }
 /// <summary>
 /// Construct with the provided model update timestep increment (tau).
 /// </summary>
 /// <param name="tau">The timestep increment, e.g. 0.01 for 10 millisecond increments.</param>
 public CartDoublePolePhysics(double tau)
 {
     _tau       = tau;
     _state     = new double[6];
     _equations = new CartDoublePoleEquations();
 }
 /// <summary>
 /// Construct with the model defaults.
 /// </summary>
 public CartDoublePolePhysics()
 {
     _state     = new double[6];
     _equations = new CartDoublePoleEquations();
 }