예제 #1
0
 /// <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 CartSinglePolePhysics(float tau, float[] state)
 {
     Debug.Assert(state.Length == 4);
     _tau       = tau;
     _state     = state;
     _equations = new CartSinglePoleEquations();
 }
 /// <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 CartSinglePolePhysicsRK2(
     float tau,
     float[] state,
     CartSinglePoleEquations equations)
     : base(tau, state, equations)
 {
 }
 /// <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 CartSinglePolePhysicsRK4(
     float tau,
     float[] state,
     CartSinglePoleEquations equations)
     : base(tau, state, equations)
 {
     _tau_half = _tau / 2f;
 }
예제 #4
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 CartSinglePolePhysics(float tau)
 {
     _tau       = tau;
     _state     = new float[4];
     _equations = new CartSinglePoleEquations();
 }
예제 #5
0
 /// <summary>
 /// Construct with the model defaults.
 /// </summary>
 public CartSinglePolePhysics()
 {
     _state     = new float[4];
     _equations = new CartSinglePoleEquations();
 }