Skip to content

Home

openstudio-backporter

pypi python Build Status codecov

A small library to backport an OpenStudio OSM model to an older version. I am only adding backports as old as I need to.

Install

pip install openstudio-backporter

Usage

CLI

A CLI feature is provided, that you can invoke via python -m openstudiobackporter

See python -m openstudiobackporter --help for the list of command line parameters and how to use it.

Example:

python -m openstudiobackporter \
       --to-version 3.8.0 \
       --save-intermediate \
       --verbose \
       /path/to/model3_10_0.osm

Library

You can also use it as a library:

from pathlib import Path
from openstudiobackporter import Backporter

backporter = Backporter(to_version="3.9.0", save_intermediate=False)
idf_file = backporter.backport_file(osm_path=Path("/path/to/model_3_10_0.osm"))

# or
model = openstudio.model.exampleModel()
idf_file = backporter.backport(idf_file=model) # or model.toIdfFile()

This is free software (MIT License) contributed by EffiBEM.

Leveraging software, EffiBEM specializes in providing new ways to streamline your workflows and create new tools that work with limited inputs for your specific applications. We also offer support and training services on BEM simulation engines (OpenStudio and EnergyPlus).