The role of the patent system in the pharmaceutical sector is highly debated also due to its strong public health implications. In this paper we develop an evolutionary, agent-based model of the pharmaceutical industry to explore the impact of different configurations of the patent system upon innovation and competition. The model is able to replicate the main stylized facts of the drug industry as emergent properties. We perform policy experiments to assess the impact of different IPR regimes changing the breadth and length of patents. Results suggest that enlarging the extent and duration of patents yields adverse effects in terms of innovation outcomes, as well as of market competition and consumer welfare. Such general conclusions hold even if one takes into account the possible positive effects on R&D intensity and information disclosure triggered by patents.