smif

Simulation Modelling Integration Framework

https://github.com/nismod/smif

Science Score: 77.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 12 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    8 of 13 committers (61.5%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.4%) to scientific vocabulary

Keywords

coupling infrastructure model optimization simulation
Last synced: 6 months ago · JSON representation ·

Repository

Simulation Modelling Integration Framework

Basic Info
  • Host: GitHub
  • Owner: nismod
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage: http://www.itrc.org.uk
  • Size: 11.5 MB
Statistics
  • Stars: 22
  • Watchers: 7
  • Forks: 6
  • Open Issues: 22
  • Releases: 16
Topics
coupling infrastructure model optimization simulation
Created over 9 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Authors

README.rst

.. _readme:

====
smif
====

Simulation Modelling Integration Framework

.. image:: https://github.com/nismod/smif/actions/workflows/test.yml/badge.svg
    :target: https://github.com/nismod/smif/actions/workflows/test.yml
    :alt: GitHub Actions build status

.. image:: https://img.shields.io/pypi/v/smif.svg
    :target: https://pypi.python.org/pypi/smif
    :alt: PyPI package

.. image:: https://img.shields.io/conda/vn/conda-forge/smif.svg
    :target: https://anaconda.org/conda-forge/smif
    :alt: conda-forge package

.. image:: https://zenodo.org/badge/67128476.svg
   :target: https://zenodo.org/badge/latestdoi/67128476
   :alt: Archive

.. image:: https://img.shields.io/badge/JORS-10.5334%2fjors.265-blue.svg
   :target: https://doi.org/10.5334/jors.265
   :alt: Journal of Open Research Software paper

.. image:: https://readthedocs.org/projects/smif/badge/?version=latest
   :target: https://smif.readthedocs.io/en/latest/?badge=latest
   :alt: Documentation Status

**smif** is a framework for handling the creation, management and running of system-of-systems
models.

A system-of-systems model is a collection of system simulation models that are coupled through
dependencies on data produced by each other.

**smif** provides a user with the ability to

- create system-of-systems models

  - add simulation models to a system-of-systems model
  - create dependencies between models by linking model inputs and outputs
  - pick from a library of data adapters which perform common data conversions across
    dependencies
  - create user-defined data adapters for more special cases
  - add scenario data sources and link those to model inputs within a system-of-systems

- add a simulation model to a library of models

  - write a simulation model wrapper which allows **smif** to run the model
  - define multi-dimensional model inputs, outputs and parameters and appropriate metadata

- run system-of-systems models

  - link concrete scenario data sets to a system-of-systems model
  - define one or more decision modules that operate across the system-of-systems
  - define a narrative to parameterise the contained models
  - persist intermediate data for each model output, and write results to a data store for
    subsequent analysis

In summary, the framework facilitates the hard coupling of complex systems models into a
system-of-systems.

Should I use **smif**?
======================

There are number of practical limits imposed by the implementation of **smif**.
These are a result of a conscious design decision that stems from the requirements of
coupling the infrastructure system models to create the next generation
National Infrastructure System Model (NISMOD2).

The discussion below may help you determine whether **smif** is an appropriate
tool for you.

- **smif** *is not* a scheduler, but has been designed to make performing
  system-of-systems analyses with a scheduler easier

- Geographical extent is expected to be defined explicitly by a vector geometry

  - **smif** *is not* optimised for models which simulate on a grid,
    though they can be accomodated
  - **smif** *is* designed for models that read and write spatial data
    defined over irregular grids or polygons using any spatial format readable
    by `fiona `_

- Inputs and outputs are exchanged at the ‘planning timestep’ resolution

  - **smif** makes a distinction between simulation of operation, which happens
    at a model-defined timestep resolution, and application of
    planning decisions which happens at a timestep which is synchronised
    between all models
  - **smif** *is not* focussed on tight coupling between models which need to exchange
    data at every simulation timestep (running in lockstep)
  - **smif** *does* accomodate individual models with different spatial and temporal
    (and other dimensional) resolutions, by providing data adaptors to convert from one
    resolution to another

- **smif** has been designed to support the coupling of bottom-up, engineering
  simulation models built to simulate the operation of a given infrastructure system

  - **smif** *provides* a mechanism for passing information from the system-of-systems
    level (at planning timesteps scale) to the contained models
  - **smif** *is* appropriate for coupling large complex models that exchange
    resources and information at relatively course timesteps

- **smif** is not appropriate for

  - discrete event system simulation models (e.g. queuing systems)
  - dynamical system models (e.g. predator/prey)
  - equilibrium models without explicit timesteps (e.g. Land-Use Transport Interaction)
  - for simulating 100s of small actor-scale entities within a system-level environment

Installation and Configuration
==============================

**smif** is written in Python (Python>=3.5) and has a number of dependencies.
See `requirements.txt` for a full list.

Using conda
-----------

The recommended installation method is to use `conda
`_, which handles packages and virtual environments,
along with the `conda-forge` channel which has a host of pre-built libraries and packages.

Create a conda environment::

    conda create --name smif_env python=3.6

Activate it (run each time you switch projects)::

    conda activate smif_env

Add the conda-forge channel, which has smif available::

    conda config --add channels conda-forge

Finally install ``smif``::

    conda install smif


Installing `smif` with other methods
------------------------------------

Once the dependencies are installed on your system,
a normal installation of `smif` can be achieved using pip on the command line::

        pip install smif

Versions under development can be installed from github using pip too::

        pip install git+http://github.com/nismod/smif

To install from the source code in development mode::

        git clone http://github.com/nismod/smif
        cd smif
        python setup.py develop


Spatial libraries
-----------------

``smif`` optionally depends on `fiona `_ and `shapely
`_, which depend on the GDAL and GEOS libraries. These
add support for reading and writing common spatial file formats and for spatial data
conversions.

If not using conda, on Mac or Linux these can be installed with your OS package manager::

    # On debian/Ubuntu:
    apt-get install gdal-bin libspatialindex-dev libgeos-dev

    # or on Mac
    brew install gdal
    brew install spatialindex
    brew install geos

Then to install the python packages, run::

    pip install smif[spatial]


Running `smif` from the command line
====================================

Follow the `getting started guide
`_ to help set up the
necessary configuration.

To set up an sample project in the current directory, run::

        $ smif setup

To list available model runs::

        $ smif list
        demo_model_run
        ...

To start the smif app, a user-interface that helps to display, create and edit a configuration,
run::

        $ smif app

To run a system-of-systems model run::

        $ smif run demo_model_run
        ...
        Model run complete

By default, results will be stored in a results directory, grouped by model run
and simulation model.

To see all options and flags::

        $ smif --help
        usage: smif [-h] [-V] {setup,list,run} ...

        Command line tools for smif

        positional arguments:
        {setup,list,app,run}  available commands
            setup               Setup the project folder
            list                List available model runs
            app                 Open smif app
            run                 Run a model

        optional arguments:
        -h, --help        show this help message and exit
        -V, --version     show the current version of smif

Citation
========

If you use **smif** for research, please cite the software directly:

* Will Usher, Tom Russell, Roald Schoenmakers, Craig Robson, Fergus Cooper, Thibault Lestang & Rose Dickinson. (2019). nismod/smif
  vX.Y.Z (Version vX.Y.Z). Zenodo. http://doi.org/10.5281/zenodo.1309336

Here's an example BibTeX entry::

        @misc{smif_software,
              author       = {Will Usher and Tom Russell and Roald Schoenmakers and Craig Robson and Fergus Cooper and Thibault Lestang and Rose Dickinson},
              title        = {nismod/smif vX.Y.Z},
              month        = Aug,
              year         = 2018,
              doi          = {10.5281/zenodo.1309336},
              url          = {https://doi.org/10.5281/zenodo.1309336}
        }

Please also cite the software description paper:

* Will Usher and Tom Russell. (2019) A Software Framework for the Integration of Infrastructure
  Simulation Models. Journal of Open Research Software, 7: 16 DOI:
  https://doi.org/10.5334/jors.265

Here's an example BibTeX entry::

        @misc{smif_paper,
              author       = {Will Usher and Tom Russell},
              title        = {A Software Framework for the Integration of Infrastructure Simulation Models},
              journal      = {Journal of Open Research Software},
              volume       = {7},
              number       = {16},
              pages        = {1--5},
              month        = May,
              year         = {2019},
              doi          = {10.5334/jors.265},
              url          = {https://doi.org/10.5334/jors.265}
        }


A word from our sponsors
========================

**smif** was written and developed at the `Environmental Change Institute, University of Oxford
`_ within the EPSRC sponsored MISTRAL programme, as part of the
`Infrastructure Transition Research Consortium `_.

Owner

  • Name: National Infrastructure Systems Model
  • Login: nismod
  • Kind: organization
  • Location: United Kingdom

Citation (CITATION.cff)

cff-version: 1.0.3
message: If you use this software, please cite it as below.
authors:
  - family-names: Usher
    given-names: Will
  - family-names: Russell
    given-names: Tom
  - family-names: Schoenmakers
    given-names: Roald
  - family-names: Robson
    given-names: Craig
  - family-names: Cooper
    given-names: Fergus
  - family-names: Lestang
    given-names: Thibault
  - family-names: Dickinson
    given-names: Rose
title: "smif: simulation modelling integration framework"
version: 1.1.0
date-released: 2019-05-07
repository-code: "https://github.com/nismod/smif/"
license: MIT
url: "http://smif.readthedocs.io/"

GitHub Events

Total
  • Pull request event: 1
  • Create event: 1
Last Year
  • Pull request event: 1
  • Create event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 2,539
  • Total Committers: 13
  • Avg Commits per committer: 195.308
  • Development Distribution Score (DDS): 0.609
Past Year
  • Commits: 10
  • Committers: 2
  • Avg Commits per committer: 5.0
  • Development Distribution Score (DDS): 0.2
Top Committers
Name Email Commits
Tom Russell t****l@g****m 994
Will Usher w****r@o****k 773
roaldl r****n@o****k 535
Thibault Lestang t****g@c****k 59
Fergus Cooper f****2@g****m 48
Craig Robson c****1@n****k 41
RoaldL r****n@g****m 31
Thibault Lestang t****g@g****m 13
Will Usher w****r@u****k 13
dependabot[bot] 4****]@u****m 13
Roald Lemmen c****6@O****K 8
Tom Russell t****l@o****k 8
Rose Dickinson r****n@s****k 3
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 46
  • Total pull requests: 74
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 24 days
  • Total issue authors: 5
  • Total pull request authors: 6
  • Average comments per issue: 1.78
  • Average comments per pull request: 0.97
  • Merged pull requests: 48
  • Bot issues: 0
  • Bot pull requests: 52
Past Year
  • Issues: 0
  • Pull requests: 11
  • Average time to close issues: N/A
  • Average time to close pull requests: 8 days
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.64
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 11
Top Authors
Issue Authors
  • tomalrussell (22)
  • willu47 (20)
  • fcooper8472 (2)
  • tlestang (1)
  • roseDickinson (1)
Pull Request Authors
  • dependabot[bot] (63)
  • tomalrussell (11)
  • fcooper8472 (6)
  • tlestang (2)
  • willu47 (2)
  • roseDickinson (1)
Top Labels
Issue Labels
enhancement (17) bug (9) feature:usability (6) feature:decisions (4) feature:gui (3) feature:performance (3) documentation (3) parent_issue (2) feature:validation (1) wontfix (1)
Pull Request Labels
dependencies (63) javascript (29)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 62 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 64
  • Total maintainers: 2
pypi.org: smif

Simulation Modelling Integration Framework

  • Versions: 46
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 62 Last month
Rankings
Dependent packages count: 10.1%
Dependent repos count: 21.6%
Average: 23.8%
Downloads: 39.8%
Maintainers (2)
Last synced: 7 months ago
conda-forge.org: smif

smif is a framework for handling the creation of system-of-systems models. The framework handles inputs and outputs, dependencies between models, persistence of data and the communication of state across years. This version of the framework handles simulation models that simulate the operation of a system within a year. smif exposes an interface to a planning module which allows different algorithms to be used against a common API.

  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 34.0%
Average: 44.3%
Stargazers count: 45.8%
Forks count: 46.0%
Dependent packages count: 51.2%
Last synced: 7 months ago

Dependencies

src/smif/app/package-lock.json npm
  • 960 dependencies
src/smif/app/package.json npm
  • @babel/core ^7.11.4 development
  • @babel/plugin-proposal-object-rest-spread ^7.11.0 development
  • @babel/polyfill ^7.10.4 development
  • @babel/preset-env ^7.11.0 development
  • @babel/preset-react ^7.10.4 development
  • @babel/register ^7.10.5 development
  • babel-eslint ^10.1.0 development
  • babel-loader ^8.1.0 development
  • chai ^4.2.0 development
  • clean-webpack-plugin ^4.0.0 development
  • codecov ^3.7.2 development
  • cross-env ^5.2.1 development
  • css-loader ^6.5.1 development
  • enzyme ^3.11.0 development
  • enzyme-adapter-react-16 ^1.15.3 development
  • eslint ^8.2.0 development
  • eslint-plugin-react ^7.20.6 development
  • html-webpack-plugin ^5.5.0 development
  • jsdom ^13.2.0 development
  • jsdom-global ^3.0.2 development
  • mini-css-extract-plugin ^2.4.4 development
  • mocha ^9.2.0 development
  • nyc ^15.1.0 development
  • react-hot-loader ^4.12.21 development
  • react-test-renderer ^16.13.1 development
  • sinon ^7.5.0 development
  • style-loader ^0.23.0 development
  • webpack ^5.63.0 development
  • webpack-cli ^4.9.1 development
  • webpack-dev-server ^4.4.0 development
  • ansi-to-react ^6.1.6
  • bootstrap ^4.5.2
  • immutability-helper ^2.9.1
  • isomorphic-fetch ^3.0.0
  • moment ^2.27.0
  • prop-types ^15.7.2
  • rc-slider ^8.7.1
  • rc-steps ^3.6.0
  • react ^16.13.1
  • react-dom ^16.13.1
  • react-icons ^3.11.0
  • react-modal ^3.11.2
  • react-redux ^6.0.1
  • react-router-dom ^4.2.2
  • react-select ^2.4.4
  • react-table ^6.11.5
  • redux ^4.0.5
  • redux-logger ^3.0.6
  • redux-thunk ^2.2.0
requirements-docs.txt pypi
  • Sphinx ==1.8.1
  • better-apidoc *
  • m2r *
  • requests *
requirements.txt pypi
  • Flask >=0.12
  • Pint >=0.8
  • Rtree >=0.7
  • fiona >=1.7
  • isodate >=0.6
  • minio *
  • networkx >=1.11
  • numpy >=1.11
  • pandas *
  • psycopg2 >=2,7
  • pyarrow ==0.9
  • python-dateutil >=2.6
  • pywin32 *
  • requests *
  • ruamel.yaml >=0.15.50
  • shapely >=1.3
  • xarray *