How to create an optimal timetable ?

A good timetable is a compromise between A good compromise is based on a (company wide agreed upon) feasibility of the trips. A usual value is 85%. This means that 85% of the trips can be completed within the scheduled trip time. (Other commonly used values for the feasibility are 80% and 90%.)

The 85% trip time varies during the day and between different types of days. If it varies more than a few minutes, several homogeneous periods during the day must be distinguished. (Usually, Saterdays and Sundays require a schedule that is different from normal working days.) A useful timetable follows the indicated homogeneous periods closely, or else there will be trips that have too much time scheduled and others that have insufficient time scheduled.
Both cases are bad, because schedule adherence is hardly possible. In order to determine a partition in homogeneous periods, a few dozen specimens of each scheduled trip must be observed. This is infeasible unless most (or all) vehicles are equipped with computers that collect this data automatically.

After a partition in homogeneous periods is determined, passing moments for all stops during each period must be computed.
A passing moment prescribes the time after which a vehicle is allowed to depart from the stop. Optimal passing moments are computed such that a vehicle that departs exactly on that moment has a probablity of 85% (or the agreed upon feasibility) to reach the terminal stop on time.

A vehicle may not leave or drive by a stop until the passing moment for that stop has passed. Once drivers experience that the passing moment system works, schedule adherence on departure at the first stop of the route tends to improve substantially.

Usually, a feasibility of 85% does not lead to nice whole numbers for the trip times. Thus, some rounding is called for. The TRITAPT program allows setting the total trip time for a homogeneous period (thus slightly adjusting the feasibility). TRITAPT rounds the passing moments for the intermediate stops to the nearest second. Some human judgement is required in converting these times to a published schedule.

If the on-board computers can store a timetable and determine the position of the vehicle in real-time, the driver can be presented his/her current punctuality deviation, thus relieving him/her of constantly having to compare the actual position of the vehicle with the scheduled position.

These schedule improvements schould be performed regularly (once or twice per year), because

The TRITAPT software tries to identify control time, but does not always make the correct decision.