agent-based modeling using l-.58exs- - ufpr using lsd… · agent-based modeling simulation models...

122
Agent-based Modeling Simulation Models L S D: a summary Using L S D References Agent-based Modeling using L S D Marco VALENTE 1,2,3 1 LEM, S. Anna School of Advanced Studies, Pisa 2 University of L’Aquila 3 University of Sussex, SPRU

Upload: others

Post on 24-May-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Agent-based Modeling using LSD

Marco VALENTE1,2,3

1LEM, S. Anna School of Advanced Studies, Pisa

2University of L’Aquila

3University of Sussex, SPRU

Page 2: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

ABM: a definition

Agent-based models are based on a hierarchical datastructure subject to real time dynamics.

Low-level (component) entities have weak constraints anda degree of heterogeneity.High-level (aggregate) entities are at least partly influencedby the states of the low level entities.Asynchronous time dynamics independently operating oneach variable.

Page 3: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

ABM: a definition

Agent-based models are based on a hierarchical datastructure subject to real time dynamics.

Low-level (component) entities have weak constraints anda degree of heterogeneity.

High-level (aggregate) entities are at least partly influencedby the states of the low level entities.Asynchronous time dynamics independently operating oneach variable.

Page 4: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

ABM: a definition

Agent-based models are based on a hierarchical datastructure subject to real time dynamics.

Low-level (component) entities have weak constraints anda degree of heterogeneity.High-level (aggregate) entities are at least partly influencedby the states of the low level entities.

Asynchronous time dynamics independently operating oneach variable.

Page 5: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

ABM: a definition

Agent-based models are based on a hierarchical datastructure subject to real time dynamics.

Low-level (component) entities have weak constraints anda degree of heterogeneity.High-level (aggregate) entities are at least partly influencedby the states of the low level entities.Asynchronous time dynamics independently operating oneach variable.

Page 6: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

ABM: a definition

Compared to mathematical models (system of equations), ABmodels are perceived as subject to fewer constraints andproducing weaker results.

Actually, ABM’s are subject to logical and temporal consistency,which impose strong constraints.

Page 7: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

ABM: a definition

The difference between standard (mathematical) modeling andABM concerns a subtle difference in the use of the term“equations”:

1 In mathematical models equations are a-temporalconstraints to be respected, not indicating explicitly anaction. Solutions are a set of values satisfying all theconstraints, but nothing can be said for values outside thesolution(s) and the patterns towards solution(s).

2 In simulation models equations are time-specificdescriptions of an agent’s (or entity) action, with“solutions” being the time patterns generated.

ABM’s generate virtual histories, to be used to testhypotheses and conjectures.

Page 8: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

ABM: a definition

The difference between standard (mathematical) modeling andABM concerns a subtle difference in the use of the term“equations”:

1 In mathematical models equations are a-temporalconstraints to be respected, not indicating explicitly anaction. Solutions are a set of values satisfying all theconstraints, but nothing can be said for values outside thesolution(s) and the patterns towards solution(s).

2 In simulation models equations are time-specificdescriptions of an agent’s (or entity) action, with“solutions” being the time patterns generated.

ABM’s generate virtual histories, to be used to testhypotheses and conjectures.

Page 9: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

ABM: a definition

The difference between standard (mathematical) modeling andABM concerns a subtle difference in the use of the term“equations”:

1 In mathematical models equations are a-temporalconstraints to be respected, not indicating explicitly anaction. Solutions are a set of values satisfying all theconstraints, but nothing can be said for values outside thesolution(s) and the patterns towards solution(s).

2 In simulation models equations are time-specificdescriptions of an agent’s (or entity) action, with“solutions” being the time patterns generated.

ABM’s generate virtual histories, to be used to testhypotheses and conjectures.

Page 10: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

ABM in Economics

In Economics ABM offer an alternative to maximization andequilibrium models, and hence are popular among heterodoxscholars. ABM’s have been used for a wide variety of topics:innovation, growth, organization theory, consumer theory,policy, etc.

ABM’s are, however, strongly criticized, even by members ofthe community, for several reasons, slowing their diffusion andquestioning their usefulness.

Page 11: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

ABM in Economics

In Economics ABM offer an alternative to maximization andequilibrium models, and hence are popular among heterodoxscholars. ABM’s have been used for a wide variety of topics:innovation, growth, organization theory, consumer theory,policy, etc.

ABM’s are, however, strongly criticized, even by members ofthe community, for several reasons, slowing their diffusion andquestioning their usefulness.

Page 12: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

ABM in Economics

Some of these criticisms are deserved. The most relevant arelisted below:

1 Difficulty to use;2 Lack of disclosure on the model contents;3 Difficulty of replicating claimed results;4 Lack of accepted methodology to assess the results.

They will be addressed during the course proposing solutionsfor both the technical and methodological issues.

Page 13: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

ABM in Economics

Some of these criticisms are deserved. The most relevant arelisted below:

1 Difficulty to use;

2 Lack of disclosure on the model contents;3 Difficulty of replicating claimed results;4 Lack of accepted methodology to assess the results.

They will be addressed during the course proposing solutionsfor both the technical and methodological issues.

Page 14: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

ABM in Economics

Some of these criticisms are deserved. The most relevant arelisted below:

1 Difficulty to use;2 Lack of disclosure on the model contents;

3 Difficulty of replicating claimed results;4 Lack of accepted methodology to assess the results.

They will be addressed during the course proposing solutionsfor both the technical and methodological issues.

Page 15: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

ABM in Economics

Some of these criticisms are deserved. The most relevant arelisted below:

1 Difficulty to use;2 Lack of disclosure on the model contents;3 Difficulty of replicating claimed results;

4 Lack of accepted methodology to assess the results.

They will be addressed during the course proposing solutionsfor both the technical and methodological issues.

Page 16: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

ABM in Economics

Some of these criticisms are deserved. The most relevant arelisted below:

1 Difficulty to use;2 Lack of disclosure on the model contents;3 Difficulty of replicating claimed results;4 Lack of accepted methodology to assess the results.

They will be addressed during the course proposing solutionsfor both the technical and methodological issues.

Page 17: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Outline

Objective: learning how to use simulations implemented in Lsdto make research in Economics

OutlineDefinitions: a normal form of simulation models.Introduction to Lsd: equations, structures andconfigurations of models.Tutorials: implementation of example models: linear,random walk, replicator dynamics, ...Lectures: presentation of papers based on agent-basedmodels.Methodology: discuss methodological issues ineconomics.

Page 18: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Outline

Objective: learning how to use simulations implemented in Lsdto make research in Economics

OutlineDefinitions: a normal form of simulation models.

Introduction to Lsd: equations, structures andconfigurations of models.Tutorials: implementation of example models: linear,random walk, replicator dynamics, ...Lectures: presentation of papers based on agent-basedmodels.Methodology: discuss methodological issues ineconomics.

Page 19: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Outline

Objective: learning how to use simulations implemented in Lsdto make research in Economics

OutlineDefinitions: a normal form of simulation models.Introduction to Lsd: equations, structures andconfigurations of models.

Tutorials: implementation of example models: linear,random walk, replicator dynamics, ...Lectures: presentation of papers based on agent-basedmodels.Methodology: discuss methodological issues ineconomics.

Page 20: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Outline

Objective: learning how to use simulations implemented in Lsdto make research in Economics

OutlineDefinitions: a normal form of simulation models.Introduction to Lsd: equations, structures andconfigurations of models.Tutorials: implementation of example models: linear,random walk, replicator dynamics, ...

Lectures: presentation of papers based on agent-basedmodels.Methodology: discuss methodological issues ineconomics.

Page 21: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Outline

Objective: learning how to use simulations implemented in Lsdto make research in Economics

OutlineDefinitions: a normal form of simulation models.Introduction to Lsd: equations, structures andconfigurations of models.Tutorials: implementation of example models: linear,random walk, replicator dynamics, ...Lectures: presentation of papers based on agent-basedmodels.

Methodology: discuss methodological issues ineconomics.

Page 22: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Outline

Objective: learning how to use simulations implemented in Lsdto make research in Economics

OutlineDefinitions: a normal form of simulation models.Introduction to Lsd: equations, structures andconfigurations of models.Tutorials: implementation of example models: linear,random walk, replicator dynamics, ...Lectures: presentation of papers based on agent-basedmodels.Methodology: discuss methodological issues ineconomics.

Page 23: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Methodological perspective

1 Research models do not aim at replicating reality.

2 Research models aim at explaining reality.

Page 24: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Methodological perspective

1 Research models do not aim at replicating reality.2 Research models aim at explaining reality.

Page 25: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Methodological assumptions

We sustain that the scientific use of simulation models consistin four steps:

1 Build a simplified representation of a reality.

2 Ensure that the model generates simulated eventscompatible with those observed in the real world.

3 Find interesting explanations of simulated events, as ifanalysing the record of a virtual history.

4 Evaluate whether the same explanations apply to the realworld cases, too.

Page 26: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Methodological assumptions

We sustain that the scientific use of simulation models consistin four steps:

1 Build a simplified representation of a reality.2 Ensure that the model generates simulated events

compatible with those observed in the real world.

3 Find interesting explanations of simulated events, as ifanalysing the record of a virtual history.

4 Evaluate whether the same explanations apply to the realworld cases, too.

Page 27: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Methodological assumptions

We sustain that the scientific use of simulation models consistin four steps:

1 Build a simplified representation of a reality.2 Ensure that the model generates simulated events

compatible with those observed in the real world.3 Find interesting explanations of simulated events, as if

analysing the record of a virtual history.

4 Evaluate whether the same explanations apply to the realworld cases, too.

Page 28: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Methodological assumptions

We sustain that the scientific use of simulation models consistin four steps:

1 Build a simplified representation of a reality.2 Ensure that the model generates simulated events

compatible with those observed in the real world.3 Find interesting explanations of simulated events, as if

analysing the record of a virtual history.4 Evaluate whether the same explanations apply to the real

world cases, too.

Page 29: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Methodological assumptions

Notice that the comparison between virtual and observed data(validation) is of relatively lesser importance, being only onestep in the use of simulation modeling for research focused onfinding interesting explanations.

The concept of explanation can be formally defined and, usedas synonym of knowledge, scientifically assessed.

Page 30: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Simulation models vs programs

Simulation models and simulation programs are distinctentities.

Simulation models as abstract, logical constructs, much like atheorem or a mathematical system of equations. They aredefined by logical/mathematical operations located in time.

A simulation program is one of the ways to generate theimplicit outcomes of the model, and requires a large amount oftechnical software.

Page 31: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Simulation models vs programs

Simulation models and simulation programs are distinctentities.

Simulation models as abstract, logical constructs, much like atheorem or a mathematical system of equations. They aredefined by logical/mathematical operations located in time.

A simulation program is one of the ways to generate theimplicit outcomes of the model, and requires a large amount oftechnical software.

Page 32: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Simulation models vs programs

Simulation models and simulation programs are distinctentities.

Simulation models as abstract, logical constructs, much like atheorem or a mathematical system of equations. They aredefined by logical/mathematical operations located in time.

A simulation program is one of the ways to generate theimplicit outcomes of the model, and requires a large amount oftechnical software.

Page 33: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Topics of the course

Using a standard programming language the most difficult taskfor modelers of ABM is not the coding of the model. Rather it isthe coding of ancillary tools necessary to declare the model’selements, assign initial values, analyse the state of the model,interpret and export results, etc.

Using LSD, contrary to most languages, the modeller suppliesonly the definitions of the elements in the model. The systemautomatically produces professional tools to control and accessany aspect of the model required for its scientific use.

Page 34: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Topics of the course

Using a standard programming language the most difficult taskfor modelers of ABM is not the coding of the model. Rather it isthe coding of ancillary tools necessary to declare the model’selements, assign initial values, analyse the state of the model,interpret and export results, etc.

Using LSD, contrary to most languages, the modeller suppliesonly the definitions of the elements in the model. The systemautomatically produces professional tools to control and accessany aspect of the model required for its scientific use.

Page 35: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Topics of the course

The stages for using a model for research, discussed duringthe course, are the following:

Design: decide what the model should be like to contributeto a research project.

Implementation: turning an abstract idea into a workingsimulation program.Interpretation: extracting knowledge from simulationmodels.Revision: the implementation must always proceedgradually, revising and extending previous code.Documentation: simulation results must be properlyformatted to report (and support) scientific claims.

Page 36: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Topics of the course

The stages for using a model for research, discussed duringthe course, are the following:

Design: decide what the model should be like to contributeto a research project.Implementation: turning an abstract idea into a workingsimulation program.

Interpretation: extracting knowledge from simulationmodels.Revision: the implementation must always proceedgradually, revising and extending previous code.Documentation: simulation results must be properlyformatted to report (and support) scientific claims.

Page 37: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Topics of the course

The stages for using a model for research, discussed duringthe course, are the following:

Design: decide what the model should be like to contributeto a research project.Implementation: turning an abstract idea into a workingsimulation program.Interpretation: extracting knowledge from simulationmodels.

Revision: the implementation must always proceedgradually, revising and extending previous code.Documentation: simulation results must be properlyformatted to report (and support) scientific claims.

Page 38: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Topics of the course

The stages for using a model for research, discussed duringthe course, are the following:

Design: decide what the model should be like to contributeto a research project.Implementation: turning an abstract idea into a workingsimulation program.Interpretation: extracting knowledge from simulationmodels.Revision: the implementation must always proceedgradually, revising and extending previous code.

Documentation: simulation results must be properlyformatted to report (and support) scientific claims.

Page 39: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Topics of the course

The stages for using a model for research, discussed duringthe course, are the following:

Design: decide what the model should be like to contributeto a research project.Implementation: turning an abstract idea into a workingsimulation program.Interpretation: extracting knowledge from simulationmodels.Revision: the implementation must always proceedgradually, revising and extending previous code.Documentation: simulation results must be properlyformatted to report (and support) scientific claims.

Page 40: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Topics of the course

In the rest of this introductory talk we will address the followingissues:

1 Define a normal form for simulation models.2 Describe the LSD overall structure and introduce its

interfaces.

Page 41: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Definition of simulation models

A simulation model is defined independently from the mediumimplementing it. We need a definition of simulation model suchthat to perfectly identify the results produced by running themodel.

Simulation model: generic definition of how a set oftime-indexed variables is computed:

Xt = fX (Xt−k ,Yt , α),Yt = fY (...),Zt = fZ (...)

Simulation results: sequence(s) of values across simulationtime steps:

{X1,X2, ...,Xt , ...,XT}, {Y1,Y2, ...,Yt , ...,YT}, {Z1,Z2, ...,Zt , ...,ZT}

Page 42: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Definition of simulation models

A simulation model is defined independently from the mediumimplementing it. We need a definition of simulation model suchthat to perfectly identify the results produced by running themodel.

Simulation model: generic definition of how a set oftime-indexed variables is computed:

Xt = fX (Xt−k ,Yt , α),Yt = fY (...),Zt = fZ (...)

Simulation results: sequence(s) of values across simulationtime steps:

{X1,X2, ...,Xt , ...,XT}, {Y1,Y2, ...,Yt , ...,YT}, {Z1,Z2, ...,Zt , ...,ZT}

Page 43: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Definition of simulation models

A simulation model is defined independently from the mediumimplementing it. We need a definition of simulation model suchthat to perfectly identify the results produced by running themodel.

Simulation model: generic definition of how a set oftime-indexed variables is computed:

Xt = fX (Xt−k ,Yt , α),Yt = fY (...),Zt = fZ (...)

Simulation results: sequence(s) of values across simulationtime steps:

{X1,X2, ...,Xt , ...,XT}, {Y1,Y2, ...,Yt , ...,YT}, {Z1,Z2, ...,Zt , ...,ZT}

Page 44: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Definition of simulation models

The definition of simulation model we provide is meant tosatisfy a few requirements:

1 Univocal. The definition must be unambiguous, makingimpossible to include different implementations of thesame model generating different (or undetermined) results.

2 User friendly. It must be as close as possible to (one of)the way(s) people usually refer to models in naturallanguage.

3 Easy to edit. Implementing a model is a continuousprocess of unplanned revisions of existing code, thus theimplementation needs to allow changes without effort.

4 Scalable. ABM models frequently require largedimensions, hence the implementation should technicallyallow for large scale models.

Page 45: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Definition of simulation models

The definition of simulation model we provide is meant tosatisfy a few requirements:

1 Univocal. The definition must be unambiguous, makingimpossible to include different implementations of thesame model generating different (or undetermined) results.

2 User friendly. It must be as close as possible to (one of)the way(s) people usually refer to models in naturallanguage.

3 Easy to edit. Implementing a model is a continuousprocess of unplanned revisions of existing code, thus theimplementation needs to allow changes without effort.

4 Scalable. ABM models frequently require largedimensions, hence the implementation should technicallyallow for large scale models.

Page 46: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Definition of simulation models

The definition of simulation model we provide is meant tosatisfy a few requirements:

1 Univocal. The definition must be unambiguous, makingimpossible to include different implementations of thesame model generating different (or undetermined) results.

2 User friendly. It must be as close as possible to (one of)the way(s) people usually refer to models in naturallanguage.

3 Easy to edit. Implementing a model is a continuousprocess of unplanned revisions of existing code, thus theimplementation needs to allow changes without effort.

4 Scalable. ABM models frequently require largedimensions, hence the implementation should technicallyallow for large scale models.

Page 47: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Definition of simulation models

The definition of simulation model we provide is meant tosatisfy a few requirements:

1 Univocal. The definition must be unambiguous, makingimpossible to include different implementations of thesame model generating different (or undetermined) results.

2 User friendly. It must be as close as possible to (one of)the way(s) people usually refer to models in naturallanguage.

3 Easy to edit. Implementing a model is a continuousprocess of unplanned revisions of existing code, thus theimplementation needs to allow changes without effort.

4 Scalable. ABM models frequently require largedimensions, hence the implementation should technicallyallow for large scale models.

Page 48: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Definition of simulation models

The elementary components of AB models are the following:

1 Variables2 Parameters3 Functions4 Objects

Page 49: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Variables

Variables are labels, or symbols, that at each time step areassociated to one and only one numerical value.The numerical value of a variable is computed executing anequation, defined as any computational elaboration of thevalues of some elements defined in the model.

Xt = fX (...)

The equation fX (...) may contain any legal computationalexpression.

Page 50: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Parameters

Parameters are labels associated to numerical values.Parameters do not change value of their own accord.

α

Page 51: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Functions

Functions are, like variables, numerical values computed asresult of an equation. However, the values generated byfunctions are not associated to time steps, but are computedon request during the execution of other equations.

X = f (...)

Notice that functions provide values used only internallybecause they cannot be saved as results because the samefunction may produce several values, or none, at the same timestep.

Page 52: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Objects

In almost all cases a model is designed to contain many copies,or instances, of variables, parameters and functions. Theyshare the same label and properties (i.e. equations) but aredistinguished from one another.

In mathematical format we normally use vectors to storemultiple elements, using the same label with different indexesto refer to each member of a given set:

~X = {X 1,X 2, ...,X i , ...,X n}~X = {Y 1,Y 2, ...,Y i , ...,Y n}~Z = {Z 1,Z 2, ...,Z i , ...,Z n}

Page 53: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Objects

However, in “hierarchical” models, vector-basedrepresentations are extremely annoying. Here are twoexamples of practical difficulties.

Consider a variable referred to a firm (among many) operatingin a market (among many). The model will then refer to thisvariable using two indexes for the firm and the marketcontaining it. Extending the model to have many markets wouldrequire adding a third index to each and every position in thecode referring to the variables of firms.

Troubles emerge also when we deal with models of dynamicsets. Adding a new firm to a market requires to extend all thevectors referring to this entity. And adding a variable requireschanges to each position adding or removing firms.

Page 54: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Objects

However, in “hierarchical” models, vector-basedrepresentations are extremely annoying. Here are twoexamples of practical difficulties.

Consider a variable referred to a firm (among many) operatingin a market (among many). The model will then refer to thisvariable using two indexes for the firm and the marketcontaining it. Extending the model to have many markets wouldrequire adding a third index to each and every position in thecode referring to the variables of firms.

Troubles emerge also when we deal with models of dynamicsets. Adding a new firm to a market requires to extend all thevectors referring to this entity. And adding a variable requireschanges to each position adding or removing firms.

Page 55: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Objects

However, in “hierarchical” models, vector-basedrepresentations are extremely annoying. Here are twoexamples of practical difficulties.

Consider a variable referred to a firm (among many) operatingin a market (among many). The model will then refer to thisvariable using two indexes for the firm and the marketcontaining it. Extending the model to have many markets wouldrequire adding a third index to each and every position in thecode referring to the variables of firms.

Troubles emerge also when we deal with models of dynamicsets. Adding a new firm to a market requires to extend all thevectors referring to this entity. And adding a variable requireschanges to each position adding or removing firms.

Page 56: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Objects

Programming languages have developed a more powerfulconcept, that includes vectors as special cases, but it is farmore general: objects.

Objects are containers, storing together different types ofelements forming an identifiable unit.

Programming using objects is far simpler than using vectors.Moreover, objects are particularly useful for simulations, sincethe unit representing an object can easily be associated to areal-world entity.

Page 57: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Definition of simulation models

Object-based representations are equivalent to a matrix-basedrepresentation.

Object-basedObOne1 ObOne2 ... ObOneN

~X X 1 X 2 ... X N

Vect

or-

base

d

~Y Y 1 Y 2 ... Y N

~α α1 α2 ... αN

~ObTwo ObTwo1 ObTwo2 ... ObTwoN

Object-based representations are far more flexible than vectors,easily expressing, for example, the equivalent of nestedmatrices and matrices with different number of rows in eachcolumn.

Page 58: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Model Structure

In summary, we can call the structure of a model the set of thefollowing elements:

1 Variables. Symbols associated to a single value at eachtime step, computed according to a specified equation.

2 Parameters. Symbols associated to values not changingof their own accord.

3 Functions. Symbols providing values computed by anequation on request by other equations (independentlyfrom the time).

4 Objects. Units containing a set of other elements.

Page 59: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Model Configuration

The structure of a model is an abstract description of itselements, defining generically how the values of a generic timestep t can be computed on the base of the values inheritedfrom previous time steps t − 1, t − 2, ....

When we start the simulation the values of the model at timet < 1 are not available, and therefore must be provided by theuser.

The same model structure will then produce different resultsdepending on the numerical values assigned at t = 0. Let’s seewhich numerical values for each type of element can affect theresults. Call the set of relevant values the initialization of amodel.

Page 60: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Model Configuration

A first part of the initialization is the number of objects, since italso determines the number of other elements.

Notice that the assignment of objects’ numbers may be quiteelaborated, with different number of entities for different“branches” of the model.

Page 61: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Model Configuration

Obviously, every parameter must be assigned an initial value.But also, possibly, some variables and functions may requireone or more values.

Consider the equation

Xt = Yt−1 + α

At time t = 1, the very first step of the simulation, the equationbecomes:

X1 = Y0 + α

Y0 cannot be produced by the model, since 1 is the first timestep. Consequently, the modeller that must assign to Y alagged (or past) value for Y as part of the initialization of themodel.

Page 62: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Model Configuration

Obviously, every parameter must be assigned an initial value.But also, possibly, some variables and functions may requireone or more values.

Consider the equation

Xt = Yt−1 + α

At time t = 1, the very first step of the simulation, the equationbecomes:

X1 = Y0 + α

Y0 cannot be produced by the model, since 1 is the first timestep. Consequently, the modeller that must assign to Y alagged (or past) value for Y as part of the initialization of themodel.

Page 63: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Definition of simulation models

A simulation model is therefore univocally defined (i.e.producing the same results) once we describe the followingelements:

Equations: pieces of code computing values for eachvariable and function in the model.

Configuration:Structure: list of variables, parameters, functions eachpositioned within a set of hierarchically related objects.Initialization: number of objects, values for parameters,lagged values for variables and functionsSim. settings: num. of time steps, num. of simulation runs,pseudo-random sequences, visualization and savingoptions.

Page 64: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Definition of simulation models

A simulation model is therefore univocally defined (i.e.producing the same results) once we describe the followingelements:

Equations: pieces of code computing values for eachvariable and function in the model.Configuration:

Structure: list of variables, parameters, functions eachpositioned within a set of hierarchically related objects.

Initialization: number of objects, values for parameters,lagged values for variables and functionsSim. settings: num. of time steps, num. of simulation runs,pseudo-random sequences, visualization and savingoptions.

Page 65: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Definition of simulation models

A simulation model is therefore univocally defined (i.e.producing the same results) once we describe the followingelements:

Equations: pieces of code computing values for eachvariable and function in the model.Configuration:

Structure: list of variables, parameters, functions eachpositioned within a set of hierarchically related objects.Initialization: number of objects, values for parameters,lagged values for variables and functions

Sim. settings: num. of time steps, num. of simulation runs,pseudo-random sequences, visualization and savingoptions.

Page 66: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Definition of simulation models

A simulation model is therefore univocally defined (i.e.producing the same results) once we describe the followingelements:

Equations: pieces of code computing values for eachvariable and function in the model.Configuration:

Structure: list of variables, parameters, functions eachpositioned within a set of hierarchically related objects.Initialization: number of objects, values for parameters,lagged values for variables and functionsSim. settings: num. of time steps, num. of simulation runs,pseudo-random sequences, visualization and savingoptions.

Page 67: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD simulation models

Any programming language can, in principle, implement anymodel. However, most languages (for ABM or generic) requirealso a lot of complex technical code to interact with the model,or pose rigid limitations on running or extending an existingmodel.

LSD allows users to generate a simulation program definingonly the elements of a simulation model according to theformat proposed above.

LSD provides automatically simulation programs complete withinterfaces, debugger, graphics etc. allowing the full access toany relevant aspect of the model.

Page 68: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD Motivation

LSD is a complete suite dedicated to design, implement,revise, analyse, document and re-use agent-basedsimulation models for research purposes.

Writing and using a computer program for research purposes iscompletely different from the same activity in standard softwaredevelopment.

Page 69: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Programming vs. Simulating

Software engineering Research simulations

Programmersvs. users

Distinct people/roles/skills Same people

Objective Pre-determined output, meansirrelevant

Indeterminate output, themeans are very crucial

Developmentstrategy

Top-down: design the structureand then fill in the details

Bottom-up: define elementarycomponents and then piecethem together

Implementationdetails

Hidden to final users Required for assessment andre-use

Unexpectedresult

Bug, to be removed Potentially relevant discovery, tobe investigated

Extending be-yond originalscope

Impossible, complexity crisis Desirable/necessary

Summary Black-box providing a well-defined and predictable output

Virtual world replicating the puz-zles of reality and allowing theirsolving.

Page 70: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Programming vs. Simulating

Software engineering Research simulationsProgrammersvs. users

Distinct people/roles/skills Same people

Objective Pre-determined output, meansirrelevant

Indeterminate output, themeans are very crucial

Developmentstrategy

Top-down: design the structureand then fill in the details

Bottom-up: define elementarycomponents and then piecethem together

Implementationdetails

Hidden to final users Required for assessment andre-use

Unexpectedresult

Bug, to be removed Potentially relevant discovery, tobe investigated

Extending be-yond originalscope

Impossible, complexity crisis Desirable/necessary

Summary Black-box providing a well-defined and predictable output

Virtual world replicating the puz-zles of reality and allowing theirsolving.

Page 71: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Programming vs. Simulating

Software engineering Research simulationsProgrammersvs. users

Distinct people/roles/skills Same people

Objective Pre-determined output, meansirrelevant

Indeterminate output, themeans are very crucial

Developmentstrategy

Top-down: design the structureand then fill in the details

Bottom-up: define elementarycomponents and then piecethem together

Implementationdetails

Hidden to final users Required for assessment andre-use

Unexpectedresult

Bug, to be removed Potentially relevant discovery, tobe investigated

Extending be-yond originalscope

Impossible, complexity crisis Desirable/necessary

Summary Black-box providing a well-defined and predictable output

Virtual world replicating the puz-zles of reality and allowing theirsolving.

Page 72: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Programming vs. Simulating

Software engineering Research simulationsProgrammersvs. users

Distinct people/roles/skills Same people

Objective Pre-determined output, meansirrelevant

Indeterminate output, themeans are very crucial

Developmentstrategy

Top-down: design the structureand then fill in the details

Bottom-up: define elementarycomponents and then piecethem together

Implementationdetails

Hidden to final users Required for assessment andre-use

Unexpectedresult

Bug, to be removed Potentially relevant discovery, tobe investigated

Extending be-yond originalscope

Impossible, complexity crisis Desirable/necessary

Summary Black-box providing a well-defined and predictable output

Virtual world replicating the puz-zles of reality and allowing theirsolving.

Page 73: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Programming vs. Simulating

Software engineering Research simulationsProgrammersvs. users

Distinct people/roles/skills Same people

Objective Pre-determined output, meansirrelevant

Indeterminate output, themeans are very crucial

Developmentstrategy

Top-down: design the structureand then fill in the details

Bottom-up: define elementarycomponents and then piecethem together

Implementationdetails

Hidden to final users Required for assessment andre-use

Unexpectedresult

Bug, to be removed Potentially relevant discovery, tobe investigated

Extending be-yond originalscope

Impossible, complexity crisis Desirable/necessary

Summary Black-box providing a well-defined and predictable output

Virtual world replicating the puz-zles of reality and allowing theirsolving.

Page 74: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Programming vs. Simulating

Software engineering Research simulationsProgrammersvs. users

Distinct people/roles/skills Same people

Objective Pre-determined output, meansirrelevant

Indeterminate output, themeans are very crucial

Developmentstrategy

Top-down: design the structureand then fill in the details

Bottom-up: define elementarycomponents and then piecethem together

Implementationdetails

Hidden to final users Required for assessment andre-use

Unexpectedresult

Bug, to be removed Potentially relevant discovery, tobe investigated

Extending be-yond originalscope

Impossible, complexity crisis Desirable/necessary

Summary Black-box providing a well-defined and predictable output

Virtual world replicating the puz-zles of reality and allowing theirsolving.

Page 75: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Programming vs. Simulating

Software engineering Research simulationsProgrammersvs. users

Distinct people/roles/skills Same people

Objective Pre-determined output, meansirrelevant

Indeterminate output, themeans are very crucial

Developmentstrategy

Top-down: design the structureand then fill in the details

Bottom-up: define elementarycomponents and then piecethem together

Implementationdetails

Hidden to final users Required for assessment andre-use

Unexpectedresult

Bug, to be removed Potentially relevant discovery, tobe investigated

Extending be-yond originalscope

Impossible, complexity crisis Desirable/necessary

Summary Black-box providing a well-defined and predictable output

Virtual world replicating the puz-zles of reality and allowing theirsolving.

Page 76: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Programming vs. Simulating

Software engineering Research simulationsProgrammersvs. users

Distinct people/roles/skills Same people

Objective Pre-determined output, meansirrelevant

Indeterminate output, themeans are very crucial

Developmentstrategy

Top-down: design the structureand then fill in the details

Bottom-up: define elementarycomponents and then piecethem together

Implementationdetails

Hidden to final users Required for assessment andre-use

Unexpectedresult

Bug, to be removed Potentially relevant discovery, tobe investigated

Extending be-yond originalscope

Impossible, complexity crisis Desirable/necessary

Summary Black-box providing a well-defined and predictable output

Virtual world replicating the puz-zles of reality and allowing theirsolving.

Page 77: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD Goal

A theoretical model is implemented in a computer programrequiring a lot of highly sophisticated technical code to define,observe and control the model.

The goal of LSD is to allow modelers/users to work exclusivelyon the content of the model producing automatically all theinterfaces required to access the model and without posinglimitations to exploitation of the model.

Page 78: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Design

The key points of the LSD design are the following:

1 Extremely limited number of building blocks: variables andobjects.

2 Model as a set of discrete-time differenceequations/programming routines.

3 Modular, self-assembling computational structure.4 Automatic, context- and content-dependent

high-performance interfaces.5 Efficient, powerful and multi-platform code (GNU C++).

Page 79: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Design

The key points of the LSD design are the following:

1 Extremely limited number of building blocks: variables andobjects.

2 Model as a set of discrete-time differenceequations/programming routines.

3 Modular, self-assembling computational structure.4 Automatic, context- and content-dependent

high-performance interfaces.5 Efficient, powerful and multi-platform code (GNU C++).

Page 80: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Design

The key points of the LSD design are the following:

1 Extremely limited number of building blocks: variables andobjects.

2 Model as a set of discrete-time differenceequations/programming routines.

3 Modular, self-assembling computational structure.

4 Automatic, context- and content-dependenthigh-performance interfaces.

5 Efficient, powerful and multi-platform code (GNU C++).

Page 81: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Design

The key points of the LSD design are the following:

1 Extremely limited number of building blocks: variables andobjects.

2 Model as a set of discrete-time differenceequations/programming routines.

3 Modular, self-assembling computational structure.4 Automatic, context- and content-dependent

high-performance interfaces.

5 Efficient, powerful and multi-platform code (GNU C++).

Page 82: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Design

The key points of the LSD design are the following:

1 Extremely limited number of building blocks: variables andobjects.

2 Model as a set of discrete-time differenceequations/programming routines.

3 Modular, self-assembling computational structure.4 Automatic, context- and content-dependent

high-performance interfaces.5 Efficient, powerful and multi-platform code (GNU C++).

Page 83: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD Components

A model is made of:Variables’ equations: a chunk of code expressing howthe generic instance of the variable updates its value at thegeneric time step.A model structure: sets of objects containing variables,parameters, or other objects;Initial data: numerical values to initialize the mode, suchas the number of copies for each object and the values forparameters and variables at time t=0.Sim.options: number of steps, results to save,pseudo-random events, running modes, etc.

Page 84: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD components

Page 85: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD Simulation stages

1 Modelers are required to provide exclusively model-relatedinformation using graphical interfaces and intuitivecommands (scripting language).

2 The execution of simulation runs is completely automatic.The system assembles the available information andarranges automatically the required operations.

3 In case of errors (e.g. division by zero, missing elements,infinite loops) the system issues detailed reports.

4 At any time users can interrupt the simulation to inspect thestate of the model and analyse the time series produced.

5 An integrated module allows to manage even massiveamounts of hierarchically-structured simulation results.

Page 86: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD Simulation stages

1 Modelers are required to provide exclusively model-relatedinformation using graphical interfaces and intuitivecommands (scripting language).

2 The execution of simulation runs is completely automatic.The system assembles the available information andarranges automatically the required operations.

3 In case of errors (e.g. division by zero, missing elements,infinite loops) the system issues detailed reports.

4 At any time users can interrupt the simulation to inspect thestate of the model and analyse the time series produced.

5 An integrated module allows to manage even massiveamounts of hierarchically-structured simulation results.

Page 87: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD Simulation stages

1 Modelers are required to provide exclusively model-relatedinformation using graphical interfaces and intuitivecommands (scripting language).

2 The execution of simulation runs is completely automatic.The system assembles the available information andarranges automatically the required operations.

3 In case of errors (e.g. division by zero, missing elements,infinite loops) the system issues detailed reports.

4 At any time users can interrupt the simulation to inspect thestate of the model and analyse the time series produced.

5 An integrated module allows to manage even massiveamounts of hierarchically-structured simulation results.

Page 88: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD Simulation stages

1 Modelers are required to provide exclusively model-relatedinformation using graphical interfaces and intuitivecommands (scripting language).

2 The execution of simulation runs is completely automatic.The system assembles the available information andarranges automatically the required operations.

3 In case of errors (e.g. division by zero, missing elements,infinite loops) the system issues detailed reports.

4 At any time users can interrupt the simulation to inspect thestate of the model and analyse the time series produced.

5 An integrated module allows to manage even massiveamounts of hierarchically-structured simulation results.

Page 89: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD Simulation stages

1 Modelers are required to provide exclusively model-relatedinformation using graphical interfaces and intuitivecommands (scripting language).

2 The execution of simulation runs is completely automatic.The system assembles the available information andarranges automatically the required operations.

3 In case of errors (e.g. division by zero, missing elements,infinite loops) the system issues detailed reports.

4 At any time users can interrupt the simulation to inspect thestate of the model and analyse the time series produced.

5 An integrated module allows to manage even massiveamounts of hierarchically-structured simulation results.

Page 90: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Output

1 Dataset containing the complete time series generated in asimulation run.

2 Multiple datasets, obtained by multiple replications of runs,automatically managed, for robustness and sensitivitytests.

3 Graphical and statistical analysis, particularly suited for LSDdata.

4 Run-time analytical tools, including graphs, messages andcustom controls.

5 Intra-simulation dynamic analysis: advance step-by-stepwith full read-write access.

6 User-defined output (compatible with C++ libraries).7 HTML automatic documentation: list of elements with

hyperlinks to relevant information.

Page 91: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Output

1 Dataset containing the complete time series generated in asimulation run.

2 Multiple datasets, obtained by multiple replications of runs,automatically managed, for robustness and sensitivitytests.

3 Graphical and statistical analysis, particularly suited for LSDdata.

4 Run-time analytical tools, including graphs, messages andcustom controls.

5 Intra-simulation dynamic analysis: advance step-by-stepwith full read-write access.

6 User-defined output (compatible with C++ libraries).7 HTML automatic documentation: list of elements with

hyperlinks to relevant information.

Page 92: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Output

1 Dataset containing the complete time series generated in asimulation run.

2 Multiple datasets, obtained by multiple replications of runs,automatically managed, for robustness and sensitivitytests.

3 Graphical and statistical analysis, particularly suited for LSDdata.

4 Run-time analytical tools, including graphs, messages andcustom controls.

5 Intra-simulation dynamic analysis: advance step-by-stepwith full read-write access.

6 User-defined output (compatible with C++ libraries).7 HTML automatic documentation: list of elements with

hyperlinks to relevant information.

Page 93: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Output

1 Dataset containing the complete time series generated in asimulation run.

2 Multiple datasets, obtained by multiple replications of runs,automatically managed, for robustness and sensitivitytests.

3 Graphical and statistical analysis, particularly suited for LSDdata.

4 Run-time analytical tools, including graphs, messages andcustom controls.

5 Intra-simulation dynamic analysis: advance step-by-stepwith full read-write access.

6 User-defined output (compatible with C++ libraries).7 HTML automatic documentation: list of elements with

hyperlinks to relevant information.

Page 94: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Output

1 Dataset containing the complete time series generated in asimulation run.

2 Multiple datasets, obtained by multiple replications of runs,automatically managed, for robustness and sensitivitytests.

3 Graphical and statistical analysis, particularly suited for LSDdata.

4 Run-time analytical tools, including graphs, messages andcustom controls.

5 Intra-simulation dynamic analysis: advance step-by-stepwith full read-write access.

6 User-defined output (compatible with C++ libraries).7 HTML automatic documentation: list of elements with

hyperlinks to relevant information.

Page 95: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Output

1 Dataset containing the complete time series generated in asimulation run.

2 Multiple datasets, obtained by multiple replications of runs,automatically managed, for robustness and sensitivitytests.

3 Graphical and statistical analysis, particularly suited for LSDdata.

4 Run-time analytical tools, including graphs, messages andcustom controls.

5 Intra-simulation dynamic analysis: advance step-by-stepwith full read-write access.

6 User-defined output (compatible with C++ libraries).

7 HTML automatic documentation: list of elements withhyperlinks to relevant information.

Page 96: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Output

1 Dataset containing the complete time series generated in asimulation run.

2 Multiple datasets, obtained by multiple replications of runs,automatically managed, for robustness and sensitivitytests.

3 Graphical and statistical analysis, particularly suited for LSDdata.

4 Run-time analytical tools, including graphs, messages andcustom controls.

5 Intra-simulation dynamic analysis: advance step-by-stepwith full read-write access.

6 User-defined output (compatible with C++ libraries).7 HTML automatic documentation: list of elements with

hyperlinks to relevant information.

Page 97: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD major features

Major features of LSD are the following:

Universal. LSD can implement any computationalexpressionUser friendly. Requires users to insert onlymodel-relevant information expressed as discreteequations and using graphical interfaces.Modular. Users can revise any portion of the model andthe system automatically updates the model program asrequired.

Powerful and scalable. LSD is implemented as compiledC++ code, running on any system and fully exploitingavailable hardware.

Page 98: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD architecture

LSD implements with different tools the equations of the modeland the rest, called generally configurations:

Equations: implemented in a power programminglanguage (C++) using a stylized format (script). Eachequation is a chunk of lines expressing the content of theequation.Configurations: names of the model elements andinitializations. Stored into text files, configurations areloaded, edited and saved by means of intuitive and flexiblegraphical interfaces.

Page 99: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD architecture

LSD implements with different tools the equations of the modeland the rest, called generally configurations:

Equations: implemented in a power programminglanguage (C++) using a stylized format (script). Eachequation is a chunk of lines expressing the content of theequation.

Configurations: names of the model elements andinitializations. Stored into text files, configurations areloaded, edited and saved by means of intuitive and flexiblegraphical interfaces.

Page 100: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD architecture

LSD implements with different tools the equations of the modeland the rest, called generally configurations:

Equations: implemented in a power programminglanguage (C++) using a stylized format (script). Eachequation is a chunk of lines expressing the content of theequation.Configurations: names of the model elements andinitializations. Stored into text files, configurations areloaded, edited and saved by means of intuitive and flexiblegraphical interfaces.

Page 101: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD technical components

LSD is distributed with a program called LSD Model Manager(LMM) performing the following tasks:

1 Organize the projects and manage the required files.2 Assist in the writing of the equations.3 Manage the compilation process.4 Provide indications on grammar errors in the equations’

code.

Page 102: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD technical components

Model Equation file

"fun_mymodel.cpp"

Compilation

Failure

GrammarError Messages

Success

Lsd Model Manager - LMM

Lsd system code

src\lsdmain.cpp

src\object.cpp

src\variable.cpp

...

Fix errors

Page 103: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD technical components

On success LMM generates an executable called LSD ModelProgram embodying the equations of the model and allowingevery remaining operation concerning the model:

1 Define, save and load model configurations.2 Run single or multiple simulations.3 Analyse the results, at run-time or at the end of the

simulation, generating data-sets and graphs .4 Investigate the model state before, during or after a run.5 Catch and report on errors at run time, keeping data

produced until the stop.6 Document a model with its own interfaces, or exporting

reports in HTML or LATEX format

Page 104: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

LSD technical components

Lsd Model Program

Model Configuration- Model Structure (Objects,Variables and Parameters)- Initial values- Sim. settings- Running options

Define and Save

Load

Run Simulation

Failure

Logical ErrorMessages

Saved data series- Analysis of Results- Export data- Export graphs

Success

Model Report

User-friendly hypertextualdocumentation

Help

Create Report

Page 105: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Using LSD

Let’s see an example of using LSD. We will perform thefollowing operations to implement a discrete version of theReplicator Dynamics model.

The operations are the following:Write the code for the variables’ equations.Assign number of objects.Assign initial values to parameters and variables at t = 0.Run simulations.Analyse the results.Document model and results.

Page 106: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Equation

Sales[t ] = Sales[t − 1]×(

1 + a× Quality − AvQuality [t ]AvQuality [t ]

)EQUATION("Sales")/*Sales expressed asdiscrete-time repl. dynamics

*/v[0]=V("Quality");v[1]=VL("Sales",1);v[2]=V("a");v[3]=V("AvQuality");

v[4]=v[1]+v[1]*v[2]*(v[0]-v[3])/v[3];RESULT(v[4])

Page 107: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Equation

AvQuality [t ] =∑N

i=1 Sales[t ]i ×Qualityi∑Ni=1 Sales[t ]i

EQUATION("AvQuality")/*Average quality, computed as weighted av. of sales

*/v[3]=0,v[2]=0;CYCLE(cur,"Firm"){v[0]=VS(cur,"Sales");v[1]=VS(cur,"Quality");v[2]=v[2]+v[0]*v[1];v[3]=v[3]+v[0];

}RESULT(v[2]/v[3]);

Page 108: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Define elements

Page 109: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Number of Objects

Page 110: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Initial Values

Page 111: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Simulation options

Page 112: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Error catching

Page 113: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Inspect

Page 114: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Results

Page 115: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Results

Page 116: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Extend

Quality [t ] = Quality [t − 1] + Random(Min,Max)

Page 117: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Endogenize

EQUATION("Quality")/*Quality expressed as a Random Walk process

*/

v[0]=VL("Quality",1);v[1]=V("min");v[2]=V("Max");

v[3]=UNIFORM(v[1],v[2]);v[4]=v[0]+v[3];RESULT(v[4] )

Page 118: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Extend

Page 119: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Sensitivity/robustness

Page 120: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

Entry/Exit

EQATION("NumberFirms")/*Control entry and exit

*/v[1]=0;v[3]=V("AvQuality");CYCLE_SAFE(cur, "Firm"){v[0]=VS(cur,"Sales");if(v[0]<0.01){//INTERACTS(cur, "Small", v[0]);DELETE(cur);

}elsev[1]++;

}v[2]=V("ProbEntry");if(RND<v[2]){cur=ADDOBJ("Firm");v[4]=v[3]*(1+UNIFORM(-0.05, 0.05) );WRITELS(cur,"Quality",v[4], t);WRITELS(cur,"Sales",100, t);v[1]++;}

RESULT(v[1] )

Page 121: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

References

LSD is available for all platform: Windows (no additionalsoftware needed), Mac OS and Linux.

To install LSD download the latest version fromgithub.com/marcov64/Lsd and unzip the file in a suitablefolder. See the Readme.txt file for installation instructions.

Page 122: Agent-based Modeling using L-.58exS- - UFPR Using LSD… · Agent-based Modeling Simulation Models LSD: a summary Using LSD References ABM: a definition Agent-based models are based

Agent-based Modeling Simulation Models LSD: a summary Using LSD References

References

www.labsimdev.org: Info, manuals, forum, etc.github.com/marcov64/Lsd: download, patches,contributionsDocumentation: manual and tutorial, available from theLMM help pages.Menus Help: context-dependent assistance available onall LSD interfaces.