This paper presents an optimal guidance algorithm which takes into account the driver's compliance with route advice. The optimization problem consists in minimizing the total travel time of guided vehicles using a queue-based model. A comparison is made between two algorithms. The first one computes an approximation of the derivative of the criterion with respect to each control at each node and at each sampling time. The second algorithm uses a numerical value of the gradient. Results show that high benefits, up to 52% in congested situations for a simple network and 8% for a more complex network, can be expected with guidance systems.