An algorithm to minimize the numbers of stops and waiting poeriods for trucks and cars in a special enviroment