# AivikaSoft

This is a web site devoted to discrete event simulation framework AivikaSim. You can find the necessary information about the framework. Also you can find Contacts if you are interested in the consulting in the simulation field.

The main idea is that simulation activities can be represented as some computations. In essence, these computations are like mathematical functions that can be created, combined and run within other computations. Then the computations become building units from which we can create a simulation model of almost any complexity. Many simulation concepts can be naturally expressed in terms of such computations.

For example, the discontinuous process is the first candidate to be expressed as computation.

```
let machine :: Process ()
machine =
do upTime <-
randomExponentialProcess meanUpTime
liftEvent $
modifyRef totalUpTime (+ upTime)
-- check the resource availability
liftEvent $
do modifyRef nRep (+ 1)
n <- resourceCount repairPerson
when (n == 1) $
modifyRef nImmedRep (+ 1)
requestResource repairPerson
repairTime <-
randomExponentialProcess meanRepairTime
releaseResource repairPerson
machine
```

The most exciting thing is that such computations can be generalized for solving the tasks of nested and distributed simulation, not only sequential simulation, which allows us to consider these tasks uniformly and, for example, to build sophisticated distributed simulation models in a robust way using the optimistic Time Warp method.