Skip to main content

Availsim4 is a tool to predict reliability and availability of modern particle accelerators and their related systems.

Project description


Availsim 4 is a software to predict reliability and availability of modern particle accelerators and the related technical systems. It is based on a Monte Carlo Discrete Event Simulation algorithm and allows for advanced availability and reliability statistics.


Python >=3.7, <4


(Optional:) Pre-requirement for Windows users

  • One of the external dependencies requires Windows users to install Microsoft Visual C++ 14.0 or greater. It can be downloaded from "Microsoft C++ Build Tools":, this requirement is needed to use the Quasi-Monte-Carlo algorithm. CERN's Windows users might prefer to use SWAN notebooks which are running on Linux machines.

(Optional:) Visualization tools

  • To generate a diagram of the architecture tree, AvailSim4 requires PyGraphviz package and Graphviz to be installed. More information and OS-specific installation guide of Graphviz: and of PyGraphviz: General instructions:
    • Linux: install Graphviz through your system package manager and then make sure to install PyGraphviz with pip or conda : apt-get update, apt-get install libgraphviz-dev, pip install pygraphviz.
    • Windows: Graphviz installation wizard can be downloaded manually from the website. Then proceed to install PyGraphviz with pip or conda. Make sure that dot program's plugins are configured by running dot -c command in your environment. May also require Microsoft C++ Build Tools as a pre-requirement .
    • MacOS: you can install Graphviz using Homebrew package manager by running command brew install graphviz and then pip install pygraphviz.

(Recommended:) Gitlab

  • Clone the project from
  • (Optional) create a dedicated virtual environment. In the context of CERN follow :
  • Install the dependencies pip install -r requirements.txt or conda install --file requirements.txt
  • For CERN users, dependencies could be installed in a dedicated folder to ease the load on the file system when executing larger number of jobs in parallel: pip install --target=/afs/ -r requirements.txt (see user guide, Running the code section)


  • AvailSim4 can also be installed via pip from PyPi pip install availsim4


AvailSim4 input arguments are the following ones: [-h] 
             --system SYSTEM
             --simulation SIMULATION 
             --output_folder OUTPUT_FOLDER
             [--sensitivity_analysis SENSITIVITYANALYSIS] 
             [--HTCondor_extra_argument OPTIONAL_EXTRA_ARGUMENT]
             [--nb_processes NB_PROCESS]
             [--children_logic PYTHON_FILE]

Example of a call for an execution on a local machine within a terminal from the project root directory:

python3 --system availsim4core/test/E2E/input/convergence/convergence_test_system.xlsx --simulation availsim4core/test/E2E/input/convergence/N1000_simulation.xlsx --output_folder output/E2E_example/

One can import Availsim4 and start it from a python script:

from availsim4core.main import main

main.start( path_simulation = 'path_to_siulation_file/simulation_file.xlsx',
            path_system = 'path_to_system_file/system_file.xlsx',
            output_folder = 'path_to_output_folder/',

A notebook, call_AvailSim4.ipynb, is provided to make calls to AvailSim4 in jupyter (e.g. SWAN for CERN users).

Example of a call for an execution on a cluster handle with HTCondor is described in the user guide.

User documentation

A guide is provided in doc/user_guide/


Copyright © CERN 2021. Released under the GPL 3.0 only license. All rights not expressly granted are reserved.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

availsim4-2.1.tar.gz (148.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page