Mechanical layer (C++)
Agent pushing another agent
Tests the force orthogonal to the contact surface, representing a damped spring interaction between two agents.
- Tests cover:
Time and position continuity for each agent
Constant y position during x-axis push
Constant orientation (theta) during push
Near-zero angular velocity (omega) during push
Stationary phase (with near constant x, y, theta and near zero vx, vy, omega)
- test_push_agent_agent.test.TIME_TOL = 0.0001
Tolerance for the constancy of the decisional time step used throughout the simulation (s).
- test_push_agent_agent.test.MAX_SPATIAL_JUMP = 1
Maximum allowed spatial jump (m) between consecutive time steps for each agent.
- test_push_agent_agent.test.DELTA_Y_TOL = 0.01
Tolerance for the constancy of y coordinate during the push on the x-axis and during the stationary phase (m).
- test_push_agent_agent.test.VX_TOL = 0.01
Tolerance for near-zero velocities along x during stationary phase (m/s).
- test_push_agent_agent.test.VY_TOL = 0.01
Tolerance for near-zero velocities along y during stationary phase (m/s).
- test_push_agent_agent.test.OMEGA_TOL = 0.01
Tolerance for near-zero angular velocities during stationary phase (rad/s).
- test_push_agent_agent.test.DELTA_X_TOL = 0.01
Tolerance for constancy of x position during stationary phase (m).
- test_push_agent_agent.test.DELTA_THETA_TOL = 0.01
Tolerance for constancy of orientation during push and stationary phase (radians).
- test_push_agent_agent.test.df()[source]
Export to CSV the XML files and load the time series once per test session.
- Returns:
DataFrame containing all time series.
- Return type:
pd.DataFrame
- test_push_agent_agent.test.test_time_and_position_continuity(df)[source]
Test time and position continuity for each agent.
- Parameters:
df (pd.DataFrame) -- DataFrame containing all time series.
- Return type:
Agent colliding with a wall
Tests the force orthogonal to the contact surface, representing a damped spring interaction between an agent and a wall.
- Tests cover:
Time and position continuity for each agent
Constant y position during x-axis push
Constant orientation (theta) during push
Near-zero angular velocity (omega) during push
Stationary phase (with near constant x, y, theta and near zero vx, vy, omega)
- test_push_agent_wall.test.TIME_TOL = 0.0001
Tolerance for the constancy of the decisional time step used throughout the simulation (s).
- test_push_agent_wall.test.MAX_SPATIAL_JUMP = 1
Maximum allowed spatial jump (m) between consecutive time steps for the agent.
- test_push_agent_wall.test.DELTA_Y_TOL = 0.01
Tolerance for the constancy of y coordinate during the push on the x-axis and during the stationary phase (m).
- test_push_agent_wall.test.VX_TOL = 0.01
Tolerance for near-zero velocities along x during stationary phase (m/s).
- test_push_agent_wall.test.VY_TOL = 0.01
Tolerance for near-zero velocities along y during stationary phase (m/s).
- test_push_agent_wall.test.OMEGA_TOL = 0.01
Tolerance for near-zero angular velocities during stationary phase (rad/s).
- test_push_agent_wall.test.DELTA_X_TOL = 0.01
Tolerance for constancy of x position during stationary phase (m).
- test_push_agent_wall.test.DELTA_THETA_TOL = 0.01
Tolerance for constancy of orientation during push and stationary phase (radians).
- test_push_agent_wall.test.df()[source]
Export to CSV the XML files and load the time series once per test session.
- Returns:
DataFrame containing all time series.
- Return type:
pd.DataFrame
- test_push_agent_wall.test.test_time_and_position_continuity(df)[source]
Test time and position continuity for each agent.
- Parameters:
df (pd.DataFrame) -- DataFrame containing all time series.
- Return type:
Agent sliding over other agents
Tests the Coulomb friction interaction between two agents as one slides over the other.
- Tests cover:
Time and position continuity for each agent
Near-zero angular velocity (omega) and near constant orientation (theta) for all agents
Agents 0 and 1 should remain static translationally: translational velocity ~ 0, x and y coordinates ~ constants
Velocity of Agent 2 should be positive along the x-axis during the slip
- test_slip_agent_agent.test.TIME_TOL = 0.0001
Tolerance for the constancy of the decisional time step used throughout the simulation (s).
- test_slip_agent_agent.test.MAX_SPATIAL_JUMP = 1
Maximum allowed spatial jump (m) between consecutive time steps for each agent.
- test_slip_agent_agent.test.VX_TOL = 0.01
Minimum velocity allowed for agent 2 along x during slip phase (m/s).
- test_slip_agent_agent.test.VX_CONTACT_TOL = 0.5
Tolerance for near-zero velocities of agent 0 and 1 along x during the whole simulation (m/s).
- test_slip_agent_agent.test.VY_CONTACT_TOL = 0.5
Tolerance for near-zero velocities of agent 0 and 1 along y during the whole simulation (m/s).
- test_slip_agent_agent.test.OMEGA_CONTACT_TOL = 0.5
Tolerance for near-zero angular velocities of all agents during the whole simulation (rad/s).
- test_slip_agent_agent.test.DELTA_THETA_CONTACT_TOL = 0.5
Maximum allowed range for orientation (theta) of all agents during the whole simulation (radians).
- test_slip_agent_agent.test.DELTA_X_CONTACT_TOL = 0.5
Maximum allowed range for x of agents 0 and 1 during the whole simulation (m).
- test_slip_agent_agent.test.DELTA_Y_CONTACT_TOL = 0.5
Maximum allowed range for y of agents 0 and 1 during the whole simulation (m).
- test_slip_agent_agent.test.df()[source]
Export to CSV the XML files and load the time series once per test session.
- Returns:
DataFrame containing all time series.
- Return type:
pd.DataFrame
- test_slip_agent_agent.test.test_time_and_position_continuity(df)[source]
Test time and position continuity for each agent.
- Parameters:
df (pd.DataFrame) -- DataFrame containing all time series.
- Return type:
- test_slip_agent_agent.test.test_omega_near_zero_and_theta_near_constant(df)[source]
Test near-zero angular velocity (omega) and near constant orientation (theta) for all agents over the whole simulation.
- Parameters:
df (pd.DataFrame) -- DataFrame containing all time series.
- Return type:
Agent sliding over a wall
Tests the Coulomb friction interaction between an agent and a wall as the agent slides.
- Tests cover:
Time and position continuity
Near-zero angular velocity (omega), constant orientation (theta)
Velocity along the x-axis should be positive during the core simulation
Velocity along the y-axis should be either near zero or negative during the core simulation
- test_slip_agent_wall.test.TIME_TOL = 0.0001
Tolerance for the constancy of the decisional time step used throughout the simulation (s).
- test_slip_agent_wall.test.MAX_SPATIAL_JUMP = 1
Maximum allowed spatial jump (m) between consecutive time steps for the agent.
- test_slip_agent_wall.test.VX_TOL = 0.01
Opposite of the minimum allowed velocity along x during core simulation (m/s).
- test_slip_agent_wall.test.VY_TOL = 0.01
Maximum allowed velocity along y during core simulation (m/s).
- test_slip_agent_wall.test.OMEGA_CONTACT_TOL = 0.5
Tolerance for near-zero angular velocities of all agents during the whole simulation (rad/s).
- test_slip_agent_wall.test.DELTA_THETA_CONTACT_TOL = 0.5
Maximum allowed range for orientation (theta) of all agents during the whole simulation (radians).
- test_slip_agent_wall.test.df()[source]
Export to CSV the XML files and load the time series once per test session.
- Returns:
DataFrame containing all time series.
- Return type:
pd.DataFrame
- test_slip_agent_wall.test.test_time_and_position_continuity(df)[source]
Test time and position continuity for each agent.
- Parameters:
df (pd.DataFrame) -- DataFrame containing all time series.
- Return type:
Agent translating and relaxing
Tests the behaviour as an agent rotates and gradually relaxes to a stationary state (no motion), due to the fluid-like torque.
- Tests cover:
Time and position continuity
Angular velocity (omega) near zero during the whole simulation
Translational velocity vx positive or near zero during the whole simulation
Translation velocity vy near zero during the whole simulation
Orientation (theta) near constant during the whole simulation
Stationary phase (with near constant x, y, theta and near zero vx, vy, omega)
- test_t_translation.test.TIME_TOL = 0.0001
Tolerance for the constancy of the decisional time step used throughout the simulation (s).
- test_t_translation.test.MAX_SPATIAL_JUMP = 1
Maximum allowed spatial jump (m) between consecutive time steps for the agent.
- test_t_translation.test.VX_TOL = 0.01
Opposite of the minimum allowed velocity along x during the whole simulation (m/s).
- test_t_translation.test.VY_TOL = 0.01
Maximum allowed velocity along y during the whole simulation (m/s).
- test_t_translation.test.OMEGA_TOL = 0.01
Maximum allowed angular velocity during the whole simulation (rad/s).
- test_t_translation.test.DELTA_THETA_TOL = 0.01
Maximum allowed range for orientation (theta) during the whole simulation (radians).
- test_t_translation.test.DELTA_Y_TOL = 0.01
Maximum allowed range for x during the stationary phase (m).
- test_t_translation.test.DELTA_X_TOL = 0.01
Maximum allowed range for y during the stationary phase (m).
- test_t_translation.test.df()[source]
Export to CSV the XML files and load the time series once per test session.
- Returns:
DataFrame containing all time series.
- Return type:
pd.DataFrame
- test_t_translation.test.test_time_and_position_continuity(df)[source]
Test time and position continuity for each agent.
- Parameters:
df (pd.DataFrame) -- DataFrame containing all time series.
- Return type:
Agent rotating and relaxing
Tests the behaviour as an agent undergoes a translation and gradually relaxes to a stationary state (no motion) due to friction.
- Tests cover:
Time and position continuity
Constant x and y position during the whole simulation
Translational velocity (vx, vy) near zero during the whole simulation
Positive or near zero angular velocity (omega)
Stationary phase (with near constant x, y, theta and near zero vx, vy, omega)
- test_t_rotation.test.TIME_TOL = 0.0001
Tolerance for the constancy of the decisional time step used throughout the simulation (s).
- test_t_rotation.test.MAX_SPATIAL_JUMP = 1
Maximum allowed spatial jump (m) between consecutive time steps for the agent.
- test_t_rotation.test.VX_TOL = 0.01
Tolerance for near-zero velocities along x during the whole simulation (m/s).
- test_t_rotation.test.OMEGA_TOL = 0.01
Tolerance for the positivity of angular velocity during the whole simulation (rad/s).
- test_t_rotation.test.DELTA_THETA_TOL = 0.01
Tolerance for constancy of orientation during the stationary phase (radians).
- test_t_rotation.test.DELTA_X_TOL = 0.01
Tolerance for constancy of x position during the stationary phase (m).
- test_t_rotation.test.DELTA_Y_TOL = 0.01
Tolerance for constancy of y position during the stationary phase (m).
- test_t_rotation.test.df()[source]
Export to CSV the XML files and load the time series once per test session.
- Returns:
DataFrame containing all time series.
- Return type:
pd.DataFrame
- test_t_rotation.test.test_time_and_position_continuity(df)[source]
Test time and position continuity for each agent.
- Parameters:
df (pd.DataFrame) -- DataFrame containing all time series.
- Return type:
- test_t_rotation.test.test_constant_position_and_near_zero_velocity(df)[source]
Position x, y should be constant and translational speed vx, vy ~ 0 for all agents during the whole simulation.
- Parameters:
df (pd.DataFrame) -- DataFrame containing all time series.
- Return type:
Agent rolling over other agents without sliding
Tests the force tangential to the contact surface, representing a damped spring interaction between two agents.
- Tests cover:
Time and position continuity
Positive or near zero angular velocity (omega) during the whole simulation
- test_tangential_spring_agent_agent.test.TIME_TOL = 0.0001
Tolerance for the constancy of the decisional time step used throughout the simulation (s).
- test_tangential_spring_agent_agent.test.MAX_SPATIAL_JUMP = 1
Maximum allowed spatial jump (m) between consecutive time steps for each agent.
- test_tangential_spring_agent_agent.test.OMEGA_CONTACT_TOL = 0.1
Tolerance for the positivity of the angular velocity (rad/s) during the whole simulation.
- test_tangential_spring_agent_agent.test.df()[source]
Export to CSV the XML files and load the time series once per test session.
- Returns:
DataFrame containing all time series.
- Return type:
pd.DataFrame
Agent rolling over a wall without sliding
Tests the force tangential to the contact surface, representing a damped spring interaction between an agent and a wall.
- Tests cover:
Time and position continuity
Positive or near zero angular velocity (omega) during the whole simulation
- test_tangential_spring_agent_wall.test.TIME_TOL = 0.0001
Tolerance for the constancy of the decisional time step used throughout the simulation (s).
- test_tangential_spring_agent_wall.test.MAX_SPATIAL_JUMP = 1
Maximum allowed spatial jump (m) between consecutive time steps for the agent.
- test_tangential_spring_agent_wall.test.OMEGA_CONTACT_TOL = 0.1
Tolerance for the positivity of the angular velocity (rad/s) during the whole simulation.
- test_tangential_spring_agent_wall.test.df()[source]
Export to CSV the XML files and load the time series once per test session.
- Returns:
DataFrame containing all time series.
- Return type:
pd.DataFrame