Skip to main content

Extension package to farn, adding support to build OSP simulation cases using FMUs

Project description

ospx

ospx is an extension package to farn, adding support to build OSP (co-)simulation cases using functional mockup units (FMUs).

ospx supports

  • building of case-specific OSP (co-)simulation configuration files
  • watching the progress of cosim, and saving final simulation results as a pandas dataframe.

Installation

pip install ospx

ospx requires the following (sub-)package:

  • dictIO: foundation package, enabling ospx to handle configuration files in dictIO dict file format.

However, dictIO gets installed automatically with ospx.

Usage Example

ospx provides both an API for use inside Python as well as a CLI for shell execution of core functions.

Reading a caseDict file and building the case-specific OSP (co-)simulation configuration files:

from ospx import OspCaseBuilder

OspCaseBuilder.build('caseDict')

The above task can also be invoked from the command line, using the 'ospCaseBuilder' command line script installed with ospx:

ospCaseBuilder caseDict

For more examples and usage, please refer to ospx's documentation on GitHub Pages.

File Format

A caseDict is a file in dictIO dict file format used with farn.

For a documentation of the caseDict file format, see File Format in ospx's documentation on GitHub Pages.

For a detailed documentation of the dictIO dict file format used by farn, see dictIO's documentation on GitHub Pages.

Development Setup

  1. Install Python 3.9 or higher, i.e. Python 3.9 or Python 3.10

  2. Update pip and setuptools:

    $ python -m pip install --upgrade pip setuptools
    
  3. git clone the farn repository into your local development directory:

    git clone https://github.com/dnv-opensource/ospx path/to/your/dev/ospx
    
  4. In the ospx root folder:

    Create a Python virtual environment:

    $ python -m venv .venv
    

    Activate the virtual environment:
    ..on Windows:

    > .venv\Scripts\activate.bat
    

    ..on Linux:

    $ source .venv/bin/activate
    

    Update pip and setuptools:

    $ python -m pip install --upgrade pip setuptools
    

    Install farn's dependencies:

    $ pip install -r requirements.txt
    

Meta

Copyright (c) 2022 DNV open source

Frank Lumpitzsch – @LinkedInfrank.lumpitzsch@dnv.com

Claas Rostock – @LinkedInclaas.rostock@dnv.com

Seunghyeon Yoo – @LinkedInseunghyeon.yoo@dnv.com

Distributed under the MIT license. See LICENSE for more information.

https://github.com/dnv-opensource/ospx

Contributing

  1. Fork it (https://github.com/dnv-opensource/ospx/fork)
  2. Create your branch (git checkout -b myBranchName)
  3. Commit your changes (git commit -am 'place your commit message here')
  4. Push to the branch (git push origin myBranchName)
  5. Create a new Pull Request

For your contribution, please make sure you follow the STYLEGUIDE before creating the Pull Request.

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

ospx-0.1.0.tar.gz (34.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ospx-0.1.0-py3-none-any.whl (40.8 kB view details)

Uploaded Python 3

File details

Details for the file ospx-0.1.0.tar.gz.

File metadata

  • Download URL: ospx-0.1.0.tar.gz
  • Upload date:
  • Size: 34.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.2

File hashes

Hashes for ospx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fc5405850499156de87fa642e2f1b7de8f87bcd12f21a925eb29cfb2c6d2529e
MD5 b81516135968fdb6ac06901d104f84b4
BLAKE2b-256 93f32539a09ce22a598f409b034865a265c55fba16422e98d748512d0b94a1a7

See more details on using hashes here.

File details

Details for the file ospx-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ospx-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 40.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.2

File hashes

Hashes for ospx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2971882ac9eefd6df2c7828118e71eeb013fe5c1942e078e4d82cd37556884b
MD5 ef0bb4a01bcedec7bdd5119ed8f03bbd
BLAKE2b-256 b8fef568cdb51912a8d369db1121edb33fe7e6712f0e4393148b9e417efec4ac

See more details on using hashes here.

Supported by

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