Modeling knowledge networks in economic geography