Getting started#
Installation#
Recommended installation#
The following installation procedure is recommended, because it ensures best performance. For example, the numpy, pandas and cvxpy packages are installed through Anaconda, which ensures the use of more performant math libraries.
Check requirements:
Clone or download repository. Ensure that the
cobmosubmodule directory is loaded as well.In Anaconda Prompt, run:
conda create -n cobmo -c conda-forge python=3.9 cvxpy numpy pandasconda activate cobmopip install -v -e path_to_repository
If you want to use CPLEX:
Install CPLEX Python interface (see latest CPLEX documentation).
Create or modify
config.yml(see below in “Configuration withconfig.yml”).
Quick installation#
Check requirements:
Python 3.9
Clone or download repository. Ensure that the
cobmosubmodule directory is loaded as well.In your Python environment, run:
pip install -v -e path_to_repository
Alternative installation#
If you are running into errors when installing or running CoBMo, this may be due to incompatibility with new versions of package dependencies, which have yet to be discovered and fixed. As a workaround, try installing CoBMo in an tested Anaconda environment via the the provided environment.yml, which represents the latest Anaconda Python environment in which CoBMo was tested and is expected to work.
Check requirements:
Windows 10
Anaconda Distribution (Python 3.x version)
Clone or download repository.
In Anaconda Prompt, run
conda env create -f path_to_cobmo_repository/environment.ymlOnce the environment setup finished, run
conda activate cobmoandpip install -e path_to_cobmo_repository.
Important
Please also create an issue on Github if you run into problems with the normal installation procedure.
Examples#
The examples directory contains run scripts which demonstrate the usage of CoBMo.
run_simulation_problem.py: Example run script to demonstrate setting up and solving a simulation problem for building operation with CoBMo.run_optimization_problem.py: Example run script to demonstrate setting up and solving an optimization problem for building operation with CoBMo.The directory
examples/developmentcontains example scripts which are under development and scripts related to the development of new features for CoBMo.
Configuration with config.yml#
CoBMo configuration parameters (e.g. the output format of plots) can be set in config.yml. As an initial user, you most likely will not need to modify the configuration.
If you want to change the configuration, you can create or modify config.yml in the CoBMo repository main directory. CoBMo will automatically create config.yml if it does not exist. Initially, config.yml will be empty. You can copy configuration parameters from cobmo/config_default.yml to config.yml and modify their value to define your local configuration. To define nested configuration parameters, you need to replicate the nested structure in config.yml. For example, to define CPLEX as the optimization solver, use:
optimization:
solver_name: cplex
The configuration parameters which are defined in config.yml will take precedence over those defined in cobmo/config_default.yml. If you would like to revert a parameter to its default value, just delete the parameter from config.yml. Please do not modify cobmo/config_default.yml directly.
Contributing#
If you are keen to contribute to this project, please see Contributing.