How to organize database structure to store the time between points (cities)?

Task: there are several delivery points (DPS) Central warehouse (CA) and shipping time between CA and PD. There is also a transport company (TC), which can also be used.
How to organize the storage of the time of delivery?
I came up with only option "in a forehead":
CA - ПД1 - Время1
CA - ПД2 - Time2
CA - ТК1 - Время3
CA - TK2 - Time4
ТК1 - ПД1 - Time5
TK2 - ПД1 - Время6

And a second related task is to find the shortest delivery time. CA-PD or CA-TK-PD.
June 5th 19 at 21:45
2 answers
June 5th 19 at 21:47
Solution
to find the shortest delivery time.

classic - traveling salesman Problem

How to organize the storage of the time of delivery?

2 signs:
-items with a description
connection between paragraphs with the time, price, TC and TD and TP
June 5th 19 at 21:49
Solution
As I understand the problem - you have your own logistics, but logistics forces have some kind of TK.
In this case, all communication is logically stored in a single table

id of item where
id of item where
id TC (self-delivery is in fact also TC)
time

Find more questions by tags AlgorithmsDatabase design