Error: Javascript scripting is disabled
Pharma model


Name of the model: Pharmaceutical industry model

Reference paper: Dosi, G., Palagi, E., Roventini, A. & Russo, E. (2021). Do patents really foster innovation in the pharmaceutical sector? Results from an evolutionary, agent-based model. LEM working paper 2021/37. Institute of Economics, Sant’Anna School of Advanced Studies.

Scope/Motivation: This agent-based model is intended to study the impact of different configurations of the patent system upon innovation and competition in the pharmaceutical sector. 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.


The model embeds an artificial industry populated by firms that compete in different submarkets corresponding to various therapeutic categories. Moreover, it includes a patent system that allows innovative companies to exclude competitors from areas of the product space surrounding their newly discovered drugs. The model can be used to simulate alternative policy scenarios regarding different features of the patent system in order to investigate their impact on industry evolution.


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. Indeed, a stronger patent system leads to higher prices and lower product quality and variety. Such general conclusions hold even if one takes into account the possible positive effects on R&D intensity and information disclosure triggered by patents.

Policy Implications / Questions

To what extent do patent rights promote innovation in the pharmaceutical sector? What are the social costs imposed by extending the scope of patent protection? We find that stronger patent regimes in the pharmaceutical sector hamper innovation, while increasing market concentration and harming consumer welfare. This underlines the need to reform patent systems and to think about alternative institutional settings and policies.

Important: a baseline simulation takes approximatively 20 minutes to run (the progress bar is currently not available).



Parameter Description Type Range Value
PAT Dummy (=1 the patent system is active; =0 there is no patent system) integer 0-1
PatBr Breadth of patents parameter integer 1-10
PatLen Length of patents parameter integer 1-30
sRD Share of R&D investment over sales real 1e-07-0.25
Psi Strength of patent disclosure effects (across submarket) integer 0-50
gamma_1 Strength of patent disclosure effects (within submarket) integer 0-50

Simulation settings

Parameter Description Type Range Value
_timeSteps_ Number of time steps to perform the simulation integer 1-300
_numRuns_ Number of times to repeat the simulation (Monte Carlo experiment) integer 1-100
_rndSeed_ First seed to be used to initialize the pseudorandom number generator integer 1-100



Simulation not started

Elapsed time



Available time series

Variable Description Selected
HHI_index Herfindal index
Markup Average markup
Submarkets Number of existing submarkets
ProdQual Average product quality
Inn_blocked Share of innovation blocked (cumulative - for incumbent firms)
Ent_blocked Share of innovation blocked (cumulative - for entrant firms)
Tot_prod Total number of existing products
Tot_RD Total R&D spending in the industry
Price Average product price

Time step range

MC plot bands

Scale options


Results status

Simulation not run

Date & time





Press the button below to reset your session. Please note that all unsaved configuration or execution results will be irreversibly lost.


Configuration section

The Configuration section allows the user to control many of its parameters, initial conditions and general simulation settings. From now on, each set of values to all the required parameters, initial conditions and simulation settings is defined as one model configuration. Every time the user initiates a new LSD web interface (LWI) session, the default model configuration is automatically loaded. From the Configuration section, the user can change any value, load a saved configuration or save the current configuration to her computer.

Configuration values can be of three types: real (floating point) numbers, integer numbers and discrete options (like yes/no). All values have predefined ranges (maximum and minimums or a set of options) and the user is not allowed to input values outside such ranges (an error message is produced).

Please note that not all combinations of configuration values may be adequate for the proper model operation. If unexpected results are obtained after changing several values at once, please try to restore some of them to the default configuration (by pressing the Default button besides any changed value) and execute the simulation again.

Model parameters

Model parameters are predefined and fixed values that are used to compute the model equations. For instance, the user can change parameters to modify simulated agent’s behavioural rules or the applicable institutional rules.

Initial conditions

Model initial conditions are the values assumed for variables which lagged values are required by the computation of model equations when the simulation starts.

Simulation settings

Simulation settings are values defining the operation of the simulation. timeSteps control the simulation time span. numRuns define how many times the simulation is run (repeated), which allows the analysis of the results as a Monte Carlo experiment. rndSeed controls the initialization of the pseudo-random number generator (PRNG). When multiple simulation runs are set, the PRNG seed is increased by one each time.

Saving the current configuration

At any moment while in the Configuration section, the user has the option to save the current configuration. The configuration is always saved to the user’s computer disk/storage as it is not possible to save it in the LWI server. It is important to regularly save any changes made to the default configuration, as any unsaved information is irreversibly lost whenever the user session expires or is reset (by clicking on Reset Session in Reset section).

To save the current configuration, simply click on Download in Configuration section. A dialog window will open, asking for the name and the destination folder of the configuration file. Configuration files have CSV (comma-separated values) format and “.csv” extension.

Loading an existing configuration

An existing configuration file, previously saved using the Download option, can be loaded at any time, by clicking on Upload in Configuration section. A dialog window will ask for the file containing the saved configuration, assuming the default “.csv” extension.

Resetting all configuration values to the defaults

Clicking Reset All replaces the current configuration values with the default ones. Be careful to use it if you have configuration changes to be saved, as the existing values are lost. If required, click on Download before using this option.

Execution section

The Execution section controls the execution of the simulation model in the LWI server. Model execution can take from a few seconds to several minutes, according to the selected configuration, in particular the chosen numbers of simulation time steps and runs.

Starting a simulation run

As soon as the user finishes the configuration of the model in the Configuration section, it is possible to start the execution by clicking on Start in the Execution section.

Stopping an unfinished simulation run

At any time the user may interrupt the simulation by clicking in Abort in the Execution section. Stopping the execution before the Status box shows “Simulation completed” aborts the simulation and no data is saved for analysis.

Checking the status of a running simulation

While the execution is going on, “Simulation running” is show in the Status box in the Execution section, together with the elapsed time. User can execute only one simulation instance at a time.

Viewing the simulation log

If there is any error preventing the simulation execution to complete, the Status box will show “Simulation failed” and the execution will be aborted and no data is saved for analysis. User can click on Log in Execution section to check the causes of the failure.

Analysis section

After the execution of the simulation model, when status box in the Execution section shows “Simulation completed”, the produced simulation time series will be available in the Analysis section.

The time series list

The user can select one or more series in time series list to be used when using the command buttons. Clicking once selects the time series and an additional click deselects it.

The time steps range selector

By default the commands in the Analysis section operate over all simulation time steps, from t = 1 to the number of time steps defined in the Configuration section. The user has the option to restrict the range of time steps to use in the analysis, by changing the default values in the Selected Time Steps box.

The scale options

The Scale box provide configuration to the scaling of the vertical axis of time series plots. The Auto option uses auto scaling to show the entire data range present in the series. The Manual option allows the user to select the minimum and maximum values for the vertical axis. The Log option uses a logarithmic scale (natural base) for the vertical plot axis, descriptive statistics and data table, instead of a linear one (Linear option).

The Monte Carlo (MC) plot bands

The MC-band options provide extra information for multi-run simulation plots. MC-bands are only available when numRuns, in Configuration section, is set to more than one run (at least 10 runs are recommended for sensible results). The Confidence option add a standard 95% confidence interval band to each series selected to plot. The Max-min option a band from the minimum to the maximum values obtained in the set of simulation runs.

Showing descriptive statistics

Clicking on Statistics in Analysis section creates a new browser window showing some descriptive statistics for the selected time series, including the mean, the standard deviation, the minimum and maximum values, the number of observations, and the Monte Carlo standard error (when the number of simulation runs is larger than one). If Log is selected, log values (natural base) are used in computations.

Creating data tables

Clicking on Data in Analysis section creates a new browser window containing a table with the selected time series in the columns and the time step values in the rows. If Log is selected, log values (natural base) are presented. At least one and up to 15 series can be selected at a time. However, multiple data windows may be open at any time.

Plotting time series

Clicking on Plot in Analysis section creates a new browser window with the selected time series plots. The horizontal axis represents the simulation time steps and the vertical axis, the selected series values. At least one and up to 15 series can be selected at a time. However, multiple data windows may be open at any time.

Export section

After an LWI simulation is successfully executed, the user can download the entire results data as (compressed) text file(s) in CSV (comma-separated values) format. CSV-formatted files can be easily imported in any numerical analysis software, like spreadsheets or statistical packages. File is compressed (zip format) only when there are results from more than one simulation run.

Saving the current configuration

As soon as simulation execution is finished, the results data file can be downloaded to the user’s computer. It is not possible to permanently save simulation results in the LWI server, so it is important to save relevant results before they are irreversibly lost whenever the user session expires or is reset (by clicking on Reset Session in Reset section).

To download any available results data, simply click on Download in Export section. A dialog window will open, asking for the name and the destination folder of the data file(s). Results files have the “.csv” extension by default and may be grouped inside a single compressed file with “.zip” extension.

The LWI data export format

LWI results data files may be zip compressed to allow downloading multiple files. Zip files can be easily decompressed in any platform.

Uncompressed CSV files are comma-separated text files. Columns contain single variables while lines represent variables values at each time step. However, the first line has a special meaning, being the first time step values located in the second line and so on. The first line contains the columns headers with the names of the variables in each column.

Reset section

The Reset Session button discards any changes made by the user, including configurations, running simulations or results data, and initiates a new LWI session. All configuration values entered by the user is lost. Any executing simulation is aborted and the results, lost.


Do you want to ask a question or inform a problem? Please send us a message.

Copyright © 2021 Scuola Superiore Sant’Anna

Powered by Chart.js, w3.css, LSD

Disclaimer: The information and views set out in this software are those of the author(s) and do not necessarily reflect the official opinion of the Scuola Superiore Sant’Anna. Sant’Anna does not guarantee the accuracy of the data included in this study. Neither Sant’Anna nor any person acting on Sant’Anna’s behalf may be held responsible for the use which may be made of the information contained therein.

Copyright Notice: This Model is property of the respective authors. The Model is protected by copyright laws, trademark and design rights. Any unauthorized use of the Model will be considered a violation of the authors’ intellectual property rights. The Model may not be copied, distributed, published or used in any way, in whole or in part, without prior written agreement from the authors, except as otherwise allowed by the agreed Conditions of Use.

No Warranties: this site, the associated model and its results are provided “as is” without any express or implied warranty of any kind including warranties of non-infringement of intellectual property or fitness for any particular purpose. In no event shall the authors or its suppliers and partners be liable for any damages whatsoever (including, without limitation, damages for loss of profits or loss of information) arising out of the use of or inability to use the information provided on this site, even if the authors or its suppliers and partners have been advised of the possibility of such damages. Because some jurisdictions prohibit the exclusion or limitation of liability for incidental or consequential damages, some of the above limitations may not apply to you.