ScalaTion

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

This system, coded in Scala, supports multi-paradigm simulation modeling including 'dynamics', 'activity', 'event', 'process' and 'state' oriented models. Scala is a modern object-oriented, functional programming language that is well-suited for developing simulation engines. ScalaTion also supports optimization and analytics as they nowadays go hand-in-hand with simulation modeling.

Future directions include adding 'scala3d' and 'physics' packages as well as a release for Scala 2.10. To use Scala 2.10 now, in the scalation.math package uncomment "// import scala.language.implicitConversions" in DoubleWithExp.scala, IntWithExp.scala and LongWithExp.scala. The code currently contains deprecated features.

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


Installation Instructions

Requires: Scala 2.9.3 and Java 6

1. Download one of the following two files:

scalation_0.9.tar.gz
scalation_0.9.zip

2. Untar or unzip the file:

$ tar xvfz scalation.tar.gz
$ unzip scalation.zip

3. ScalaTion is pre-built, but to re-build the ScalaTion system (scala Build) or parts of it:

$ cd scalation/bin
$ scala Build
$ scala Build [ -a apps_package[.file] | -s src_package[.file] | -h ]

$ scala Build -a optimization
$ scala Build -a optimization.ServiceNetwork
$ scala Build -s analytics
$ scala Build -s analytics.Regression
$ scala Build -h
Source packages are in the src directory, apps packages are in the apps directory, class files are in the classes directory, and documentation files are in the doc directory. Build itself is in the bin directory. Note, Build assumes all src packages are subpackages of scalation (e.g., scalation.analytics), so scalation is omitted from the command line.

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

$ cd ../apps/process
$ scala -cp ../../classes:classes process.Bank

If Bank.scala needs to be re-compiled,

$ cd ../../bin
$ scala Build -a process.Bank

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

$ cd ..
$ scala -cp classes scalation.analytics.RegressionTest

6. The Build App (Build.scala) is already compiled, but to re-compile the Build App:

$ cd ../../bin $ scalac Build.scala

7. To develop using an IDE:

Download Scala IDE for Eclipse
Extract the downloaded .zip/.tar.gz file
Create and run HelloWorld.scala see tutorial


Documentation/Papers

  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. scaladoc generated API for ScalaTion


Source Packages (doc)

Package Description
scalation.util A package of utilities needed by the other packages.
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 scala version of Java 2D.
scalation.plot A package for displaying basic plots and histograms.
scalation.animation A general purpose 2D 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.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.activity A simulation engine for activity oriented models such as Petri Nets.
scalation.event A simulation engine for event oriented models such as Event Graphs.
scalation.process A simulation engine for process oriented models such as Process-Interaction Models.
scalation.state A simulation engine for state oriented models such as Markov Chains.

Apps Packages (apps)

Package Description
activity Example models for activity oriented models such as Petri Nets.
analytics Example analytics problems.
dynamics Example models for systems dynamics (continuous simulation).
event Example models for event oriented models such as Event Graphs.
game Example simulation-oriented games.
montecarlo Example Monte Carlo simulation.
optimization Example optimization problems.
process Example models for process oriented models such as Process-Interaction Models.
simopt Example simulation optimization problems.
state Example models for state oriented models such as Markov Chains.

Source Packages (src)

Package Description
scalation.util A package of utilities needed by other packages.
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 scala version of Java 2D.
scalation.plot A package for displaying basic plots and histograms.
scalation.animation A general purpose 2D 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.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.activity A simulation engine for activity oriented models such as Petri Nets.
scalation.event A simulation engine for event oriented models such as Event Graphs.
scalation.process A simulation engine for process oriented models such as Process-Interaction Models.
scalation.state A simulation engine for state oriented models such as Markov Chains.

Code Generators (Under Development)

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