Decision Optimization utilities for IBM Watson Studio projects
Project description
DSE_DO_Utils
Decision Optimization utilities for IBM Watson Studio Local and ICPd projects.
Source (GitHub)
Documentation (GitHubPages)
This repository contains the package dse_do_utils
. This can be installed using pip.
Main classes:
- ScenarioManager. Reads and writes table data from and to all combinations of csv-files, Excel spreadhseet and DO scenario.
- DataManager. A DataManager is mostly a container for data and functions for pre- and post-processing. Can be subclassed and stored in a script to be able to share code between multiple notebooks. Also contains some utilities for data manipulation, like the crossjoin.
- OptimizationEngine. Also mostly a container for functions around creating an optimization model and using the docplex APIs. Can be subclassed and stored in a script to be able to share code between multiple notebooks. Also contains some functions to create dvars and export .lp files.
- ScenarioPicker. Interactively pick an existing scenario from a drop-down menu in a notebook. Typically used in visualization notebooks.
- MapManager. For creating map visualizations using Folium.
- DeployedDOModel. Interfacing from Python to a deployed DO model.
Installation
Recommend to install in the ../packages/python
folder by running the following in a notebook cell:
!pip install -i https://test.pypi.org/simple/dse-do-utils --target='../packages/python'
See also Installing packages and modules for Decision Optimization projects in Watson Studio Local
Import
Import the dse_do_utils
from the ../packages/python
folder.
First add the folder to the Python path:
import sys, os
for folder in ['packages/python', 'scripts']:
path = os.path.join(os.environ['DSX_PROJECT_DIR'], folder)
if path not in sys.path:
sys.path.insert(0, path)
Then import the required classes from the package:
from dse_do_utils import ScenarioManager, DataManager
Requirements
This package requires:
- dd-scenario. This package provides an interface to the DO scenarios. This package is only available within WSL and ICPd. It cannot be pip installed in other environments.
- docplex. This package interfaces with the CPLEX and CP Optimizer optimization engines.
- folium. Map visualization. Only for the MapManager.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for dse_do_utils-0.2.2.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6ae5e0a8065753b20592384591a83214f280d525a4787c7a0a403d9d5b2bae2 |
|
MD5 | 60d732792d0a7367b044e3727adc9736 |
|
BLAKE2b-256 | cb1006d1f33c4a544cc84d675c7301c99aed6ad52ee363e261ffa05ee2438a13 |