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