Exact solution of multicommodity network optimization problems with general step cost functions