Skip to content
Python class for dynamic stock modelling
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.
Doc Renamed for PyPi. May 24, 2015
dynamic_stock_model exponential and gamma distribution Apr 14, 2016
.gitignore Modified for PyPi. May 24, 2015
LICENSE.txt Weibull distribution added May 9, 2015
MANIFEST Modified to be fit for PyPi. May 24, 2015 Modified for PyPi. May 24, 2015
setup.cfg Modified for PyPi. May 24, 2015 Modified for PyPi. May 24, 2015


Python class for efficient handling of dynamic stock models

This project contains a class and a connected unit test for modelling dynamic stocks of materials or products, as used in dynamic material flow analysis and industrial ecology.

Note: This project is no longer maintained. The dynamic stock model class is now part of ODYM, the open dynamic material systems model. The new dsm class of ODYM includes a number of lifetime distributions, different dynamic stock models, is more thoroughly tested, and consistently uses the survival function (sf) to model the decay of age-cohorts. Please check here:

Created on Mon Jun 30 17:21:28 2014

@main author: stefan pauliuk, NTNU Trondheim, Norway
with contributions from
Chris Mutel, PSI, Villingen, CH

numpy >= 1.9
scipy >= 0.14

Documenation of all methods and functions:

Below, a quick installation guide and a link to the tutorial are provided:

a) Installation from the web repository:
This is the easiest way of installing dynamic_stock_model. Github hosts an installation package for dynamic_stock_model, which can be downloaded directly from the command line using pip:

pip install dynamic_stock_model

b) Installation as package:
Pull package via git pull or download as .zip file and unpack. Choose a convenient location (Here: 'C:\MyPythonPackages'). Then open a console, change to the directory ../dynamic_stock_model-master/, and install the package from the command line:

python install

This makes the package available to Python. At any other place in a system with the same python installation, dynamic_stock_model is now ready to be imported simply by

import dynamic_stock_model

This setup also allows us to run the unit test:

import unittest

import dynamic_stock_model

import dynamic_stock_model.tests

unittest.main(dynamic_stock_model.tests, verbosity=2)

Or, to run a specific test

unittest.main(dynamic_stock_model.tests.test_known_results, verbosity=2)

c) Manual installation, by modifying the python path
Pull package via git pull or download as .zip file and unpack. Choose a convenient location (Here: 'C:\MyPythonPackages\'). Then include in your code the following lines
> import sys


from dynamic_stock_model import DynamicStockModel

You can’t perform that action at this time.