This paper develops an agent-based real options model which is capable of analyzing the investment and disinvestment decisions of heterogeneous competing firms under consideration of tradable output permits. A permit market is integrated in which the firms either act as demanders or as suppliers according to their investment or disinvestment behavior for production capacity. By means of a combination of genetic algorithms and stochastic simulation, the endogenous equilibrium price processes for both the product and the permits are simultaneously derived. Through this, the investment and disinvestment thresholds of the heterogeneous competing firms can be simultaneously determined. The empirical application to the EU dairy sector shows that tradable output permits can have considerable effects on investment and disinvestment decisions of competing firms, especially in markets with a high degree of firm heterogeneity. Amongst others, the results indicate that the recent abolishment of the EU milk production quota will ceteris paribus not lead to an accelerated exit of less efficient farms but ultimately have quite the opposite effect.