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

Latest commit

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

Files

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

README.md

dynamic_stock_model

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: https://github.com/IndEcol/ODYM

Created on Mon Jun 30 17:21:28 2014

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

Dependencies:
numpy >= 1.9
scipy >= 0.14


Tutorial:
http://nbviewer.ipython.org/github/stefanpauliuk/dynamic_stock_model/blob/master/Doc/dynamic_stock_model_Documentation.ipynb
Documenation of all methods and functions:
http://htmlpreview.github.com/?https://github.com/stefanpauliuk/dynamic_stock_model/blob/master/Doc/dynamic_stock_model.html

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 setup.py 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

sys.path.append('C:\MyPythonPackages\dynamic_stock_model-master\dynamic_stock_model\')

from dynamic_stock_model import DynamicStockModel

You can’t perform that action at this time.