A general method for non-linear analysis of bridge structures