int PCMSMatrixSetDepartDayAndTime(int day, unsigned long hour, unsigned long min)


int day –  The day of week.

unsigned long hour –  The hour of the depart time, with a value range of 0 – 23.

unsigned long min –  The minute of the depart time, with a value range of 0 – 59.


Sets the departure time for a route matrix. (A license for RouteMatrix is required.) For departure time-based calculations, call PCMSSetDateOption and set the date option to 2 and call PCMSSetRoadSpeedType and set type to 2.

Each time you call PCMSMatrixSetDepartDayAndTime, an entire matrix will be generated after you call PCMSMatrixCalculate. If the Traffic add-on is not licensed and enabled in the PC*MILER user interface or pcmserve.ini, depart times will have no effect on the output.

Return Values 

Negative one (-1) indicates that the product is not licensed for RouteMatrix.


Sample Code

Log_Pcmstest("Add 33.279598n,111.967003w to RouteMatrix");
Log_Pcmstest("Add 35.176899n,113.790604w to RouteMatrix");
Log_Pcmstest("Add 32.813301n,111.670998w to RouteMatrix");
Log_Pcmstest("Add Departure Time Sunday 8:00am");
PCMSMatrixSetDepartDayAndTime(0, 8, 0);

Supported Since: PC*MILER Connect 27

Category: Matrix Functions