/// <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(float tau, float[] state)
 {
     Debug.Assert(state.Length == 6);
     _tau       = tau;
     _state     = state;
     _equations = new CartDoublePoleEquations();
 }
 /// <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(
     float tau,
     float[] state,
     CartDoublePoleEquations equations)
     : base(tau, state, equations)
 {
 }
Beispiel #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(
     float tau,
     float[] state,
     CartDoublePoleEquations equations)
     : base(tau, state, equations)
 {
     _tau_half = _tau / 2f;
 }
 /// <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(float tau)
 {
     _tau       = tau;
     _state     = new float[6];
     _equations = new CartDoublePoleEquations();
 }
 /// <summary>
 /// Construct with the model defaults.
 /// </summary>
 public CartDoublePolePhysics()
 {
     _state     = new float[6];
     _equations = new CartDoublePoleEquations();
 }