EXTREMAL PRINCIPLES FOR SIMULATING TRAFFIC FLOW IN A NETWORK.