A general disequilibrium model