cumulative formula for car mileage

70 Views Asked by At

I am trying to figure out how to calculate a formula for a cumulative variable as follows:

If a car company is able to produce and deliver 60 units of car model X every 3 months, spread out over the 3 months, delivering the first 2 cars on day 3, the next 2 cars on day 6 and so on, and each car can drive 500 miles per day at 90% usage, and considering there are already 200 cars in the market, at which point in time from today will the mileage of car model X reach N number of miles?

It's been a while since I did this kind of math in primary school and I can't figure out how to calculate it anymore.

1

There are 1 best solutions below

0
On BEST ANSWER

Now that we know how the cars are delivered, we know that on day $k$ there are $200+2\lfloor \frac k3 \rfloor$ cars on the road. On day $k$ they accumulate $100\ 000+1000 \lfloor \frac k3 \rfloor$ miles, assuming cars can drive on the day they are delivered. By day $N$ the original fleet has accumulated $100\ 000N$ miles. The new cars get $0,0,1000,1000,1000,2000,2000,2000,3000\ldots$ miles. If $N \equiv 2 \pmod 3$ we go through $\lfloor \frac {N+1}3 \rfloor$ groups of three evenly, accumulating $1000\cdot 3 \cdot \frac 12 \lfloor \frac {N+1}3 \rfloor\left(\lfloor \frac {N+1}3 \rfloor-1 \right)$ miles. If $N \not \equiv 2 \pmod 3$ we need to add on the last day or two. This gives the mileage as $$\begin {cases} 100\ 000 N + 1000\cdot 3\cdot \frac 12 \lfloor \frac {N+1}3 \rfloor\left(\lfloor \frac {N+1}3 \rfloor-1 \right) & N \equiv 2 \pmod 3\\100\ 000 N + 1000\cdot 3 \cdot \frac 12 \lfloor \frac {N+1}3 \rfloor\left(\lfloor \frac {N+1}3 \rfloor-1 \right) +\frac {1000N}3& N \equiv 0 \pmod 3\\100\ 000 N + 1000\cdot 3\cdot \frac 12 \lfloor \frac {N+1}3 \rfloor\left(\lfloor \frac {N+1}3 \rfloor-1 \right)+\frac{2000(N-1)}3 & N \equiv 1 \pmod 3 \end {cases}$$