The H II region-molecular cloud complex W3 - A model derived from molecular observations