Roberta Chiesa Matteo Masiera Andrea Romeo

Computer Science and Simulation for Economics

Project work on



The applet requires Java 1.4.1 or higher. It will not run on Windows 95 or Mac OS 8 or 9. Mac users must have OS X 10.2.6 or higher and use a browser that supports Java 1.4. (Safari works, IE does not. Mac OS X comes with Safari. Open Safari and set it as your default web browser under Safari/Preferences/General.) On other operating systems, you may obtain the latest Java plugin from Sun's Java site.

powered by NetLogo

view/download model file: oligopoly.nlogo


The model simulates the interaction between two companies and a market constituted by one-hundreed potential buyers.


The user can choose the number of people attached to the products of a specific company by modifying the input cells.
For example, an agent colored in green indicates the attachment of this consumer to the products of the green company and so on; if the number is equal to zero, people are colored in white and act only based on price and not also on personal preferences.
The production of every company in every period can be modified with the slider "production red" and "production green".


After pressing the setup button it is possible to choose different strategies to determine the selling price of the two companies.
In the strategy called "random price", the selling price is determined in a random way.
The user can modify with sliders a lot of things like the fixed costs,the variable ones, the production and the percentage of tolerance of green and red consumers.
The percentage of tolerance is defined as a higher price that the consumer is willing to pay to buy the good of which is attached; white agents do not have this property.
In the strategy called "fixed + variable costs" the price is determined as the sum of fixed costs divided by the production, the variable ones and the markup, that rapresents the net gain that a company wants to have by the transaction.
In the last strategy called "adaptive strategy" the initial price of both companies is one hundred; in every period, if the quantity of goods producted is higher than the quantity sold the price is reduced by 0,5, otherwise is increased by 0,5 and so on.


Have a look at the differences in prices and profits that companies can suffer by adopting different strategies.


Try to modify the number of consumers attached to the products of a specific company and all the sliders and see what happens in the simulation model especially in prices and earnings in the three strategies.


The model can be extended with the addition of a third competitor, in order to analyze the change in the balance has arisen in the duopoly.


Model "Monopolio 040" created by Pietro Terna


Model "Monopolio 040" created by Pietro Terna.


P. Terna, R. Boero, M. Morini, M. Sonnessa (a cura di) (2006), Modelli per la complessitÓ - La simulazione ad agenti in economia. il Mulino, Bologna.
Robert. S. Pindyck Daniel L. Rubinfeld, Microeconomia, Zanichelli.