How can I formalize this trasport problem?

I am having a hard time formalizing a practical problem which seems clear in my head but as soon as I try to put down some formulas it eludes my understanding.

The setting of the problem is this: there's a source $A$ (industry, factory) which produces a constant flux of some goods. Let's call this production rate $p$ (measured in tons/day). All the production has to be transported from the production facility to a location $B$ which is distant $d$ from $A$. I have $N$ lorries, each with a carrying capacity $C$. The lorries travel from $A$ to $B$ and back with a speed $v$.

Now, I would like to find the minimum number of lorries such that each day's production is completely transported to the destination, i.e. at the end of the day there is no production surplus in the production facility's storage rooms. How could I formalize that? There has to be a relation between all the variables but I cannot wrap my head around it; I don't know if I'm forgetting some fundamental parameter...

• Do we need to consider any of the following: (1) Time to load a lorry? (2) Time to unload a lorry? (3) Waiting time for a lorry to be filled (e.g., there are three lorries ahead of me already waiting to be filled)? (4) Lorries can't be at the same place at the same time (so for instance realistically, we can't have 10 lorries starting at the same instant from A to B)? And if we do have to consider this one, what spacing is required between lorries? Aug 29, 2018 at 12:47
• no, loading/unloading time does not play any role (even if it played a role it could be accounted for lowering the speed of the lorries). Also, both location $A$ and $B$ could theoretically have multiple access points so yes lorries can be at the sime time in the same place. Aug 30, 2018 at 6:25

Start with the maximum number of lorries required: production capacity is $p$ per day and carrying capacity per lorry is $C$, so we need at most $p/C$ lorries for transportation.
Can we reduce that? The distance between $A$ and $B$ is $d$ and lorries travel at a speed $v$, so each lorry takes time $t = d/v$ (I'm going to say hours here, but you need to specify your units). The round trip (from $A$ to $B$ and back again) therefore takes $2t$ hours, and a lorry is available for reuse at that time.
If these plants work 24 hours a day, then each lorry can make $24/2t$ trips per day, and so we need $(p/C)/(24/2t) = (pt/12C)$ lorries for the job. Because production is continuous we don't have to worry about integer values for any of this.
EDIT: read the bit about not storing production overnight. So, let $H$ be the hours in the working day. Then $2pt/HC$ is the number of lorries required, and round up to avoid having any production left over.
Example: let $p=1400$, $C=350$, $H=8$ and $t=0.75$ (so an $8$-hour work day and a $45$ minute trip from $A$ to $B$). Then $2pt/HC = (2\times 1400 \times 0.75)/(8 \times 350) = 0.45$ so we need one lorry. The lorry can make $5$ trips in the day, and $5\times 350 >1400$ so we're good.