# Kinematics within a simulation

• kosmopilot
In summary, the conversation discusses the simulation of a warehouse in Unity using forklifts and other vehicles to transport items. The routes are modeled as a graph and each transport is saved as a task with relevant data such as starting time, end time, starting point, and end point. The simulation runs at a constant 50fps with a multiplier T to speed up the clock. The goal is to simulate tasks within a given time span, with vehicles starting and stopping at the designated times. The solution involves adding acceleration to the simulation and using equations to calculate the maximum velocity.
kosmopilot

## Homework Statement

I'm simulating a warehouse (in Unity) where forklifts and other vehicles transport stuff from point A to point B. The routes are modeled as a graph with vertices and edges. Every transport is saved as a task in a backend system with the relevant data such as starting time, end time, starting point, end point. Therefore I have the duration t and the distance traveled s.
Right now I'm running the simulation with constant 50fps, therefore one time step occurs every 0,02s.
The simulation has its own clock that can be speed up by a multiplier T.
The goal is to simulate every task of a given time span, so that every vehicle starts moving at the start time of the task and stops moving at the end time of the task.
So far I've been using a constant velocity to achieve this. I calculate the velocity from given distance & duration multiplied by the simulation speed multiplier. The result isn't perfect since the duration to complete a task could be not a whole number like 20,4 time steps ( or ticks) which will be 21 => the task took "0,6" time steps too long. But that's another problem.

I'd like to add acceleration. When a vehicle starts a task it'll accelerate and then move at a constant maximum velocity so that it completes its task in the given duration. But what's the desired acceleration and maximum velocity?

## Homework Equations

s_a = 0.5*a*t^2
s_v = v_max *t
s_b = 0.5 * a_b * t^2

## The Attempt at a Solution

I'm thinking of splitting the distance s into three parts :

-S_a the distance traveled during acceleration,
- S_v the distance traveled with maximum velocity,
- S_b the distance traveled when stopping.

s = s_a + s_v + s_b

After looking into the data of a real forklift the acceleration time is ~5s.
Therefore a = V_max / 5s. And let's say the deceleration takes about 1s.

I'd like to know how to calculate velocity v_max. This is not a homework, it's my own project.

First thing, your equation for ##s_b## is not correct, it should be ##s_b=V_{max}*t-0.5a_b*t^2## because it already has speed V_max when it starts to decelerate.
So after that just use the equation you wrote ##s=s_a+s_v+s_b## and also use that ##a=V_{max}/5## ##a_b=V_{max}/1## so the equation will become

$$s=0.5\frac{V_{max}}{5}*5^2+V_{max}*(\Delta t-6)+V_{max}*1-0.5*V_{max}*1^2$$ (1)

where ##s,\Delta t## are given by the simulation task table if I understood correctly from the description of your simulation and are the total distance and the total time of the task. So just solve equation (1) for V_max, it is just a linear equation .

kosmopilot
Thanks, I see. I totally forgot that acceleration time t_a = 5s as is stated above.Therefore v_max = s / ( duration - 3). Thank you for your help :)

@edit : Or to make it more general v_max = s / ( t_delta - 0.5* t_a - 0.5*t_b^2)

Last edited:
Delta2

## 1. What is kinematics within a simulation?

Kinematics within a simulation refers to the study of the motion of objects or systems in a simulated environment. It involves analyzing the position, velocity, and acceleration of objects over time, without considering the factors that affect their motion, such as forces and energy.

## 2. How is kinematics used in simulations?

Kinematics is used in simulations to accurately model and predict the motion of objects or systems. By inputting initial conditions and applying mathematical equations, simulations can accurately simulate the motion of objects and provide data on their position, velocity, and acceleration.

## 3. What are some common applications of kinematics within simulations?

Kinematics within simulations is commonly used in fields such as physics, engineering, and computer graphics. It is used to simulate the motion of objects in virtual reality environments, predict the movement of spacecraft and satellites, and design and test mechanical systems.

## 4. What are the limitations of kinematics in simulations?

Kinematics within simulations only considers the motion of objects and does not take into account external factors such as friction, air resistance, and other forces. This can limit the accuracy of simulations, especially for complex systems where these factors play a significant role in the motion of objects.

## 5. How can kinematics be improved in simulations?

To improve the accuracy of kinematics within simulations, additional factors such as forces and energy can be incorporated into the simulation. This can be achieved through the use of more advanced mathematical models and algorithms, or by including data from real-world experiments to better simulate the behavior of objects in a simulated environment.

Replies
4
Views
2K
Replies
7
Views
1K
Replies
49
Views
2K
Replies
4
Views
860
Replies
1
Views
1K
Replies
8
Views
2K
Replies
19
Views
3K
Replies
78
Views
5K
Replies
3
Views
1K
Replies
2
Views
3K