'How should I generate the time windows data for solving VRPTW problem with or-tools?

I am pretty new in or-tools and I've been trying to implement the vrptw algorithm to a microservice that calculates the possible routes; furthermore, the service has been provided with the duration matrix, vehicles and routes but not the time windows matrix. How should I generate the time matrix to follow or-tools's solution or how should I approach it? I have seen or-tools's vrptw example but I couldn't figure out how can I build this matrix so your help is crucially precious. Thank you very much.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source