Modeling traffic flows with reaction networks