Skip to main content
Log in

A domain specific language for spatial simulation scenarios

  • Published:
GeoInformatica Aims and scope Submit manuscript

Abstract

This article describes DSL3S, a domain specific modelling language for Spatial Simulation in the field of Geographic Information Systems (GIS). Techniques such as cellular automata and agent-based modelling have long been used to capture and simulate the temporal dynamics of spatial information. Tools commonly employed to implement spatial simulation models include code libraries and pre-compiled models; the former require advanced programming skills while the latter impose relevant constraints on application scope. Previous attempts to produce domain specific languages in the field have invariably resulted in new textual programming languages (e.g. SELES, NetLogo, Ocelet) that are platform specific and in some cases with weak GIS support and interoperability. DSL3S synthesises relevant concepts of spatial simulation in a UML profile, that allows the design of simulation models through the arrangement of graphical elements. An implementation of this language is also presented, that relies on Model Driven Development (MDD) tools distributed with the Eclipse IDE. This includes a code generation infrastructure, that produces ready to run simulations from DSL3S models, supported by the MASON simulation tool-kit. Finally, DSL3S models for three simple and classical simulations allows to better illustrate and discuss the usage of the language.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

Notes

  1. http://www.inesc-id.pt/.

  2. http://ccl.northwestern.edu/netlogo.

  3. http://ccl.northwestern.edu/netlogo/docs/gis.html.

  4. http://www.sysml.org/.

  5. https://www.openmodelica.org/index.php/home/tools/134.

  6. http://www.omg.org/mda/.

  7. http://www.eclipse.org/modeling.

  8. http://www.eclipse.org/modeling/mdt/papyrus/.

  9. http://www.eclipse.org/modeling/emf/.

  10. http://www.acceleo.org/pages/introduction/en.

  11. http://www.omg.org/spec/MOFM2T/1.0/.

  12. http://cs.gmu.edu/~eclab/projects/mason.

  13. http://cs.gmu.edu/~eclab/projects/mason/extensions/geomason/.

  14. http://www.vividsolutions.com/JTS/JTSHome.htm.

  15. http://www.geotools.org/.

  16. http://www.gdal.org/.

  17. https://github.com/MDDLingo/DSL3S.

  18. https://githubcom/MDDLingo/wiki.

References

  1. Atkinson C, Khne T (2003) Model-driven development: a metamodeling foundation. IEEE Softw 20(5):36–41

    Article  Google Scholar 

  2. Batty M (2007) Cities and complexity. MIT

  3. Berryman M (2008) Review of software platforms for agent based models. Sci Technol

  4. Clark A, Muller P (2012) Exploiting model driven technology: a tale of two startups. Softw Syst Model 11(4):481–493

    Article  Google Scholar 

  5. Clarke KC, Hoppen S, Gaydos L (1997) A self-modifying cellular automaton model of historical urbanization in the san francisco bay area. Environ Plan B 24:247–261

    Article  Google Scholar 

  6. de Smith MJ, Goodchild MF, Longley PA (2013) Geospatial analysis: a comprehensive guide to principles, techniques and software tools - Fourth Edition, chapter Geosimulation. Winchelsea Press, pp 625–672

  7. de Sousa L, Silva AR (2011) Review of spatial simulation tools for geographic information systems. In: Proceedings of the third international conference on advances in system simulation (SIMUL 2011). ThinkMind

  8. Degenne P, Lo Seen D, Parigot D, Forax R, Tran A, Ait Lahcen A., Cur O, Jeansoulin R (2009) Design of a domain specific language for modelling processes in landscapes. Ecol Model 220:3527–3535

    Article  Google Scholar 

  9. Dewdney AK (1988) The armchair universe, chapter sharks and fish on the planet Wa-Tor. Freeman, New York, pp 239–251

    Google Scholar 

  10. Epstein JM, Axtell R (1996) Growing artificial societies. MIT

  11. Fall A, Fall J (2001) A domain-specific language for models of landscape dynamics. Ecol Model 141:1–18

    Article  Google Scholar 

  12. Ferber J (1999) Multi-agent systems: an introduction to distributed artificial intelligence, 1st edn. Addison-Wesley Longman Publishing Co., Inc., Boston

    Google Scholar 

  13. Ferreira DF, Silva AR (2012) Rslingo: an information extraction approach toward formal requirements specifications. In: Proceedings of second IEEE international workshop on model-driven requirements engineering (MoDRE). IEEE Computer Society

  14. France R, Rumpe B (2007) Model-driven development of complex software: a research roadmap. In: 2007 future of software engineering. IEEE Computer Society, pp 37–54

  15. Franklin S, Grasser A (1997) Is it an agent or just a program? A taxonomy for autonomous agents. In: Intelligent agents III: agent theories, architectures, and languges. Springer, Berlin, pp 21–35

    Google Scholar 

  16. Giese H, Henkler S (2006) A survey of approaches for the visual model-driven development of next generation software-intensive systems. J Vis Lang Comput 17 (6):528–550

    Article  Google Scholar 

  17. Ginot V, Le Page C, Souissi S (2002) A multi-agents architecture to enhance end-user individual based modelling. Ecol Model 157:23–41

    Article  Google Scholar 

  18. Grignard A, Taillandier P, Gaudou B, Vo D, Huynh N, Drogoul A (2013) Gama 1.6: advancing the art of complex agent-based modeling and simulation. In: Boella G, Elkind E, Savarimuthu BTR, Dignum F, Purvis MK (eds) PRIMA 2013: principles and practice of multi-agent systems, volume 8291 of Lecture Notes in Computer Science. ISBN 978-3-642-44926-0. Springer, Berlin, pp 117–131. doi:10.1007/978-3-642-44927-7_9

    Google Scholar 

  19. Iba H (2013) Agent-Based Modeling and Simulation with Swarm. Chapman and Hall/CRC

  20. Kraak M, Ormeling F (2009) Cartography: visualization of spatial data, chapter data acquisition, 3rd edn. Prentice Hall

  21. Law AM (2007) Simulation modeling & analysis, 4th edn. McGraw-Hill

  22. Li X, Magill W (2001) Modeling fire spread under environmental influence using a cellular automaton approach. Complex Int 8:1–14

    Google Scholar 

  23. Luke S, Cioffi-Revilla C, Panait L, Sullivan K, Mason G (2005) Balan: A multi-agent simulation environment. Simulation: Transactions of the society for Modeling and Simulation International 82(7):517–527

    Article  Google Scholar 

  24. Merzenich J, Frid L (2005) Projecting landscape conditions in Southern Utah using VDDT. In: Bevers M, Barrett TM (eds) Systems analysis in forest resources: proceedings of the 2003 symposium. U.S. Department of Agriculture, Forest Service, Pacific Northwest Research Station, Portland, pp 157–163

    Google Scholar 

  25. Mladenoff D (2004) LANDIS and forest landscape models. Ecol Model 180 (1):7–19

    Article  Google Scholar 

  26. Mohagheghi P, Gilani W, Stefanescu A, Fernandez M, Nordmoen B, Fritzsche M (2013) Where does model-driven engineering help? Experiences from three industrial cases. Softw Syst Model 12(3):619–639

    Article  Google Scholar 

  27. Müller B, Balbi S, Buchmann CM, de Sousa L, Dressler G, Groeneveld J, Christian J, Klassert J, Le QB, Millington JDA, Nolzen H, Parker DC, Polhill JG, Schlüter M, Schulze J, Schwarz N, Sun Z, Taillandier P, Weise H (2014) Standardised and transparent model descriptions for agent-based models: current status and prospects. Environ Model Softw 55:156–163. doi:10.1016/j.envsoft.2014.01.029. ISSN 1364-8152

    Article  Google Scholar 

  28. North MJ, Howe TR, Collier NT, Vos JR (2005) The repast simphony development environment. In: Proceedings of the agent 2005 conference on generative social processes, models, and mechanisms, Chicago

  29. OMG UML 2.0 Specification. http://www.omg.org/spec/UML/2.0/, July 2005. Retrieved January 2011

  30. Paige RF, Varró D (2012) Lessons learned from building model-driven development tools. Softw Syst Model 11(4):527–539

    Article  Google Scholar 

  31. Railsback SF, Steven LL, Jackson JK (2006) Agent-based simulation platforms: review and development recommendations. Simulation 82(9):609–623

    Article  Google Scholar 

  32. Ribeiro A, Silva AR (2014) XIS-mobile: a DSL for mobile applications. In: Proceedings of ACM SAC’2014 conference. ACM

  33. Samuelson D, Macal C (2006) Agent-based simulation comes of age. OR/MS Today 33(4):34–38

    Google Scholar 

  34. Saraiva J, Silva AR (2009) Development of CMS-based web-applications using a model-driven approach. In Proceedings of the Simpsio para Estudantes de Doutoramento em Engenharia de Software (SEDES 2009, co-located with the ICSEA 2009). IEEE Computer Society

  35. Selic B (2003) The pragmatics of model-driven development. IEEE Software 20 (5):19–25

    Article  Google Scholar 

  36. Selic B (2008) Personal reflections on automation, programming culture, and model-based software engineering. Autom Softw Eng 15(3–4):379–391

    Article  Google Scholar 

  37. Silva AR, Romão A, Deugo D, Silva MM (2001) Towards a reference model for surveying mobile agent systems. Auton Agent Multi-Agent Syst J 4(3):187–231. Kluwer Academic Publishers

    Article  Google Scholar 

  38. Silva AR, Saraiva J, Ferreira D, Silva R, Videira C (2007a) Integration of RE and MDE paradigms: the ProjectIT approach and tools. IET Softw J 1(6):217–314

    Article  Google Scholar 

  39. Silva AR, Saraiva J, Silva R, Martins C (2007b) XIS - UML profile for eXtreme modeling interactive systems. In: Proceedings of the 4th international workshop on model-based methodologies for pervasive and embedded software (MOMPES 2007). IEEE Computer Society, Braga

    Google Scholar 

  40. Silva AR (2015) Model-driven engineering: a survey supported by a unified conceptual model. Comput Lang Syst Struct 43. Elsevier. doi:10.1016/j.cl.2015.06.001

  41. Tobias R, Hofmann C (2004) Evaluation of free Java-libraries for social-scientific agent based simulation. J Artif Soc Soc Simul 7(1)

  42. Trencansky I, Cervenka R (2005) Agent modeling language (AML): a comprehensive approach to modeling MAS. Informatica 29:391–400

    Google Scholar 

  43. Weiss G (ed) (1999) Multiagents systems: a modern approach to distributed artificial intelligence. MIT Press

  44. Wilson SW (1991) The animat path to AI. In: Meyer JA, Wilson S (eds) From animals to animats. MIT Press, Cambridge, pp 15–21

    Google Scholar 

  45. Wuensche A, Lesser M (1992) The global dynamics of cellular automata. Addison-Wesley

Download references

Acknowledgments

This work was partially supported by national funds through FCT - Fundação para a Ciência e a Tecnologia - under the projects UID/CEC/50021/2013, CMUP-EPB/TIC/0053/2013 and DataStorm Research Line of Excellency funding (EXCL/EEIESS/ 0257/2012).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Luís Moreira de Sousa.

Appendix A

Appendix A

This appendix details the properties of each DSL3S stereotype and how it influences the code generation process.

1.1 A.1 Simulation

1.1.1 A.1.1 Properties

  • simulName - A string with a title for the Simulation, to be presented in the user interface.

  • spaceHeight - A numeric value indicating the height of the simulation space. Used to frame the class that hosts all animat instances during simulation.

  • spaceWidth - A numeric value indicating the width of the simulation space; used as spaceHeight.

1.1.2 A.1.2 Artefacts

From this element two Java classes are generated: Sim.java, and SimGUI.java (where Sim is replaced with the content of the simulName property). The first contains all initialisation routines, that create new animats and set up the simulation at its start; it also contains methods to discard animats during simulation time. The spatial data structures holding animats, Spatial variables plus Global variables are all properties of the Sim.java class too. SimGUI.java contains all properties required to present the simulation with a MASON GUI; it also initialises these properties.

1.2 A.2 Animat

1.2.1 A.2.1 Properties

  • inputFile - Path to a spatial layer containing features setting the initial number and location of animats. Attributes of this layer can be used to initialise Attributes owned by this Animat element. Each feature in this spatial layer produces an singular Animat instance.

  • initNum - The number of animats at simulation start. In case an input layer is not provided, this property is used to randomly cast animats in the simulation space.

  • wanderer - Determines whether the animat should move randomly in case no Move stereotype is linked to it. Prevents an Animat instance from standing idle in an optimal location.

  • colourMin - An RGB colour definition used to portrait the animat in the user interface. Defines a cloropleth together with colourMax, that is used in function of the values of one or more of the Attribute elements owned.

  • colourMax - RGB colour defining the top end of the cloropleth used to portrait the Animat.

1.2.2 A.2.2 Artefacts

For each Animat class in the model a Java class with the same name is generated. It contains properties and methods to store and manage each of its Attribute elements, plus the MASON step() routine, containing the code to be executed at each simulation time step. A second Java class is also generated, again with the Animat name, but with the suffix Portrayal; as its name implies, it defines a cloropleth and methods to display the Animat in the GUI.

1.3 A.3 Attribute

1.3.1 A.3.1 Properties

  • attribute - This property is used to initialise the Attribute instance with the value of the corresponding value in the attribute table of the spatial layer assigned to the owning Animat element.

  • minValue - Minimum admissible value of the Attribute.

  • maxValue - Maximum admissible value of the Attribute.

  • stepVariation - Numerical value determining how the Attribute evolves with time. At each time step this value is summed to the Attribute.

  • display - Boolean determining if the Attribute is used to portrait the owning Animat.

  • initValue - Numerical value that initiates the Attribute (alternative to initRandom and attribute).

  • initRandom - Boolean indicating if the Attribute is to be initiated with a random value (alternative to initValue and attribute).

1.3.2 A.3.2 Artefacts

A single Java class named Variable.class is generated, that serves as a generic encapsulation for atomic values used in the simulation. This class includes a set of properties (value, maximum, minimum and variation) and a set of corresponding setter and getter methods. In the Animat Java class, a property of type Variable is generated for each owned Attribute element; the initValue and initRandom properties are included as static Java properties in the Sim.class.

1.4 A.4 Spatial

1.4.1 A.4.1 Properties

  • inputFile - Path to a spatial layer initialising the Spatial element. In case it is a vector layer, each feature generates a Spatial instance; for raster layers each cell is transformed into a Spatial instance.

  • minValue - Minimum admissible value for the variable.

  • maxValue - Maximum admissible value for the variable.

  • stepVariation - Numerical value determining how the variable evolves with time. At each time step this value is summed to the Spatial instance.

  • display - Boolean determining if the Spatial variable is to be portrayed in the user interface. Since a Spatial variable can cover the entire simulation space, not all may be displayed.

  • initValue - Numerical value that initiates the variable in all locations of the simulation space (alternative to initRandom and inputFile).

  • initRandom - Boolean indicating if the variable is to be initiated with random values (alternative to initValue and inputFile).

  • colourMin - RGB colour defining the lower end of the cloropleth used to portrait the variable.

  • colourMax - RGB colour defining the top end of the cloropleth used to portrait the variable.

1.4.2 A.4.2 Artefacts

Elements of this type in the model produce a Java class with the same name. This class extends the MasonGeometry class from the GeoMASON library and includes a property of type MasonGeometry. A Portrayal class is also generated, with the same display functions as in the Animat case.

1.5 A.5 Emerge

1.5.1 A.5.1 Properties

  • probability - Sets the probability of emergence of a new Animat in presence of the associated Attribute or Spatial variable.

  • scope - Determines the radius of the neighbourhood to take into account in the emergence process.

  • required - Boolean that sets the presence of the associated Attribute or Spatial variable as indispensable (or not) for the emergence of a new Animat instance.

  • lowerThreshold - Lower value of the interval within which the associated Attribute or Spatial variable may trigger the emergence.

  • upperThreshold - Upper value of the interval within which the associated Attribute or Spatial variable may trigger the emergence.

1.5.2 A.5.2 Artefacts

For each Animat in the model, a single Java class is produced, named after the Animat plus the suffix Emerge. The logic of every Emerge operation associated to the Animat is collected here. This Java class also has a step() method that is executed at each time step. It browses through the simulation space, at each location evaluating the probability of emergence. The probabilities from each Emerge element are summed up, if the resulting value is above a random number generated between 0 and 100, then emergence takes place.

1.6 A.6 Move

1.6.1 A.6.1 Properties

  • weight - Numerical value determining the weight of the associated element (Attribute or Spatial) in the movement process of the associated Animat.

  • scope - Sets the radius of the neighbourhood to scout.

1.6.2 A.6.2 Artefacts

For each Animat a method named move() is generated containing the logic of all Move elements linked to it. This method is included in the corresponding Animat Java class and invoked in the step() method. At each time step the move() method searches for relevant instances within the neighbourhood(s) defined, collecting a set of candidate locations. The Animat moves into the location within the set of candidates with highest weight.

1.7 A.7 Harvest

1.7.1 A.7.1 Properties

  • percentHarvested - Percentage of the harvested Attribute or Spatial variable to be taken (alternative to valueHarvested).

  • valueHarvested - Exact quantity of the harvested Attribute or Spatial variable to be taken (alternative to percentHarvested).

  • maxIntake - Sets a limit to the amount harvested from the associated Attribute or Spatial.

  • scope - Sets the radius of the neighbourhood to take into account in the harvest process.

1.7.2 A.7.2 Artefacts

For each Animat a method named harvest() is generated containing the logic of all Harvest classes linked to the Animat in the model. It searches the within the neighbourhood(s) defined for relevant instances, invoking their harvest method counterparts as needed. This method is included in the corresponding Animat Java class and invoked in the step() method.

1.8 A.8 Supply

1.8.1 A.8.1 Properties

  • maxImpact - Sets a limit to the amount supplied from the associated Attribute.

1.8.2 A.8.2 Artefacts

A method named supplyAttribute() is generated containing the logic of access to the Variable property of concerned Attribute. It is included in the respective Animat Java class.

1.9 A.9 Replicate

1.9.1 A.9.1 Properties

  • lowerThreshold - Lower value of the interval within which the associated Attribute may trigger the replication process.

  • upperThreshold - Upper value of the interval within which the associated Attribute may trigger the replication process.

  • toll - Numerical value defining the impact of replication on the associated Attribute of the parent Animat.

  • inheritance - Numerical value defining the amount transmitted to the associated Attribute from the parent to the child Animat.

1.9.2 A.9.2 Artefacts

For each Animat a method named replicate() is generated containing the logic of all Replicate classes linked to the Animat in the model. This method is included in the corresponding Animat Java class and invoked in the step() method.

1.10 A.10 Perish

1.10.1 A.10.1 Properties

  • lowerThreshold - Lower threshold of the associated Attribute below which instances of the associated Animat are discarded.

  • upperThreshold - Upper threshold of the associated Attribute below which instances of the associated Animat are discarded.

1.10.2 A.10.2 Artefacts

For each Animat Java class a method named perish() is generated containing the logic of all Perish classes linked in the model. It is invoked in the step() method a tests all the Variable type properties of concerned Attribute elements.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Moreira de Sousa, L., Rodrigues da Silva, A. A domain specific language for spatial simulation scenarios. Geoinformatica 20, 117–149 (2016). https://doi.org/10.1007/s10707-015-0233-y

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10707-015-0233-y

Keywords

Navigation