SCALAble SimulaTION - ScalaTion

Papers | Scaladoc | Source Code

Welcome to ScalaTion, the Scala-based system for Simulation, Optimization and Analytics.

This system, coded in Scala, supports multi-paradigm simulation modeling including 'tableau', 'event', 'process', 'dynamics', 'dynamics_pde', 'activity' and 'state' oriented models.

Scala is a modern object-oriented, functional programming language that is well-suited for developing simulation engines. It is in the Java family of languages and can call Java code. The inclusion of advanced and functional programming capabilities, makes the code much more concise than Java. ScalaTion also supports optimization and analytics as they nowadays go hand-in-hand with simulation modeling. Some of the algorithms come in both sequential and parallel versions.

The ScalaTion 1.0 version is a migration from version 0.9 (which works with Scala 2.9.x) to Scala 2.10.x. Future directions include completing the 'scala3d' and 'physics' packages.

Please read the LICENSE file (an MIT style license).


Installation Instructions

Requires: Scala 2.10.x and Java 7
Recommended: sbt   (see INSTALL_SBT.html)

1. Download one of the following two files

scalation.tar_1.0.gz
OR
scalation_1.0.zip

2. Untar or unzip the file

$ tar xvfz scalation_1.0.tar.gz
OR
$ unzip scalation_1.0.zip

3. Export the SCALATION_CLASSES environment variable to point at class files (use the second if not using sbt)

export SCALATION_CLASSES=$HOME/scalation_1.0/target/scala-2.10/classes
OR
export SCALATION_CLASSES=$HOME/scalation_1.0/classes

Ideally, put the export in one of your dot files (e.g., .profile or .bashrc).

4. To re-build the ScalaTion system, type the first command (the second is an alternative to sbt)

$ sbt compile
OR
$ scala Build

The Simple Build Tool sbt is the easiest way to build ScalaTion 1.0.

Source packages are in the src/main/scala directory, class files are in the target directory, and documentation files are in the doc directory. Note: 'scala Build' will place class files in the classes directory.

5. Run apps (e.g., for process oriented simulation in Bank.scala)

$ scar apps.process.Bank
OR
$ scala -cp $SCALATION_CLASSES apps.process.Bank

The 'scar' shell script works for Linux, Unix and Mac. Use 'scar.bat' for Windows.

6. Run src test code (e.g., for Regression in scalation.analytics)

$ scar scalation.analytics.RegressionTest
OR
$ scala -cp $SCALATION_CLASSES scalation.analytics.RegressionTest


To develop using an IDE:

  1. Download Scala IDE for Eclipse
  2. Extract the downloaded .zip/.tar.gz file
  3. Start eclipse by running the eclipse command or clicking eclipse application from the file manager
  4. To allow the compilation of continuations, from the menu go to Preferences -> Scala -> Compiler and type continuations:enable for the P option in the standard tab.
  5. Create and run HelloWorld.scala, see tutorial


Papers/Documentation

  1. John A. Miller, Jun Han and Maria Hybinette, "Using Domain Specific Languages for Modeling and Simulation: ScalaTion as a Case Study," Proceedings of the 2010 ACM/IEEE Winter Simulation Conference (WSC'10), Baltimore, Maryland (December 2010) pp. 741-752.

  2. Michael E. Cotterell, John A. Miller, Tom Horton, "Unicode in Domain-Specific Programming Languages for Modeling & Simulation: ScalaTion as a Case Study," Arxiv preprint arXiv:1112.175 (December 2011) pp. 1-10.

  3. Michael E. Cotterell, John A. Miller, Jun Han and Tom Horton, "Extending ScalaTion, a Domain-Specific Language for Modeling & Simulation, for Simulation Optimization," Proceedings of the AlaSim International Modeling and Simulation Conference & Exhibition (AlaSim'12), Huntsville, Alabama (May 2012) pp. 1-1.

  4. Yung Long Li, "Evaluation of Parallel Implementations of Dense and Sparse Matrices for the ScalaTion Library," Technical Report, University of Georgia (December 2012) pp. 1-60.

  5. John A. Miller, Michael E. Cotterell and Stephen J. Buckley, "Supporting a Modeling Continuum in ScalaTion: From Predictive Analytics to Simulation Modeling," Proceedings of the 2013 ACM/IEEE Winter Simulation Conference (WSC'13), Washington, DC (December 2013) pp. 1191-1202.

  6. Matthew Saltz, Ayushi Jain, Abhishek Kothari, Arash Fard, John A. Miller, and Lakshmish Ramaswamy, "DualIso: A Scalable Subgraph Pattern Matching On Large Labeled Graphs," Proceedings of the CONFERENCE, (submitted)
    Online supplement.


Source Packages (doc)

Overall scaladoc generated API for ScalaTion

Package Description
scalation.util A package of utilities needed by the other packages.
scalation.coroutine A package for non-preemptive quasi-concurrent coroutines.
scalation.math A package of mathematical objects and operations needed for analytics, simulation and optimization.
scalation.linalgebra A package of implementations for linear algebra (e.g., for vectors and matrices). Vectors and matrices of real (Double), rational and complex numbers are supported.
scalation.linalgebra_gen A package of generic implementations for linear algebra (e.g., for vectors and matrices). Vectors and matrices of types implementing Numeric can be instantiated.
scalation.calculus A package for computing derivatives, gradients and Jacobians.
scalation.random A package for random numbers and random variates (Normal distribution, etc.)
scalation.stat A package of statistical objects and operations needed for simulation, including implementations for summary statitistics and ANOVA.
scalation.scala2d A package supporting 2D graphics based on Java 2D.
scalation.scala3d A package supporting 3D graphics based on JavaFX 3D (Under development).
scalation.plot A package for displaying basic plots and histograms.
scalation.model A package defining the general form of a model.
scalation.animation A package supplying a general purpose animation engine.
scalation.minima A package supporting simulation optimization (minimization).
scalation.maxima A package supporting simulation optimization (maximization).
scalation.analytics A package supporting analytics, including regression, time series analysis and clustering.
scalation.graphalytics A package supporting graph analytics, including shortest path, etc.
scalation.metamodel A package supporting simulation metamodeling, espcially for optimization.
scalation.queueingnet A package supporting queueing network models.
scalation.tableau A simulation engine for tableau oriented (spreedsheet like) models.
scalation.event A simulation engine for event oriented models such as Event Scheduling or Event Graphs.
scalation.process A simulation engine for process oriented models such as Process-Interaction Models.
scalation.dynamics A simulation engine for systems dynamics (continuous simulation), which includes general-purpose Ordinary Differential Equation (ODE) solvers.
scalation.dynamics_pde A simulation engine for systems dynamics (continuous simulation), which includes category-specific Partial Differential Equation (PDE) solvers.
scalation.physics A physics engine for simulation based games (Under development).
scalation.activity A simulation engine for activity oriented models such as Petri Nets.
scalation.state A simulation engine for state oriented models such as Markov Chains.
apps.activity Example models for activity oriented models such as Petri Nets.
apps.analytics Example analytics problems.
apps.dynamics Example models for systems dynamics (continuous simulation).
apps.event Example models for event oriented models such as Event Graphs.
apps.game Example simulation-oriented games.
apps.montecarlo Example Monte Carlo simulation.
apps.optimization Example optimization problems.
apps.process Example models for process oriented models such as Process-Interaction Models.
apps.simopt Example simulation optimization problems.
apps.state Example models for state oriented models such as Markov Chains.
apps.tableau Example models for tableau oriented (spreadheet like) models.

Source Packages (src)

Package Description
scalation.util A package of utilities needed by other packages.
scalation.coroutine A package for non-preemptive quasi-concurrent coroutines.
scalation.math A package of mathematical objects and operations needed for analytics, simulation and optimization,
scalation.linalgebra A package of implementations for linear algebra (e.g., for vectors and matrices). Vectors and matrices of real (Double) and complex numbers are supported.
scalation.linalgebra_gen A package of generic implementations for linear algebra (e.g., for vectors and matrices). Vectors and matrices of types implementing Numeric can be instantiated.
scalation.calculus A package for computing derivatives, gradients and Jacobians.
scalation.random A package for random numbers and random variates (Normal distribution, etc.)
scalation.stat A package of statistical objects and operations needed for simulation, including implementations for summary statitistics and ANOVA.
scalation.scala2d A package supporting 2D graphics based on Java 2D.
scalation.scala3d A package supporting 3D graphics based on JavaFX 3D (Under development).
scalation.plot A package for displaying basic plots and histograms.
scalation.model A package defining the general form of a model.
scalation.animation A package supplying a general purpose animation engine.
scalation.minima A package supporting simulation optimization (minimization).
scalation.maxima A package supporting simulation optimization (maximization).
scalation.analytics A package supporting analytics, including regression, time series analysis and clustering.
scalation.graphalytics A package supporting graph analytics, including shotest path, etc.
scalation.metamodel A package supporting simulation metamodeling, especially for optimization.
scalation.queueingnet A package supporting queueing network models.
scalation.tableau A simulation engine for tableau oriented (spreedsheet like) models.
scalation.event A simulation engine for event oriented models such as Event Scheduling or Event Graphs.
scalation.process A simulation engine for process oriented models such as Process-Interaction Models.
scalation.dynamics A simulation engine for systems dynamics (continuous simulation), which includes general-purpose Ordinary Differential Equation (ODE) solvers.
scalation.dynamics_pde A simulation engine for systems dynamics (continuous simulation), which includes category-specific Partial Differential Equation (PDE) solvers.
scalation.physics A physics engine for simulation based games (Under development).
scalation.activity A simulation engine for activity oriented models such as Petri Nets.
scalation.state A simulation engine for state oriented models such as Markov Chains.
apps.activity Example models for activity oriented models such as Petri Nets.
apps.analytics Example analytics problems.
apps.dynamics Example models for systems dynamics (continuous simulation).
apps.event Example models for event oriented models such as Event Graphs.
apps.game Example simulation-oriented games.
apps.montecarlo Example Monte Carlo simulation.
apps.optimization Example optimization problems.
apps.process Example models for process oriented models such as Process-Interaction Models.
apps.simopt Example simulation optimization problems.
apps.state Example models for state oriented models such as Markov Chains.
apps.tableau Example models for tableau oriented (spreadheet like) models.

Code Generators (Under Development)

Package Description
gen_scalation.dynamics A package containing DeMO to scalation.dynamics generators.