Skip to main content

Operations Research Models & Methods (ORMM) is inspired by Paul A. Jensen’s Excel Add-ins. His Excel packages were last updated in 2011, and while I believe they do still work (for the most part), his work may become outdated in a couple of ways:

  • Excel is not as commonly used for OR, except in settings where security is of the utmost concern and/or modern languages like Python, R, Julia, C, C++, MATLAB, AMPL, or other modeling software are not available.

  • From what I understand, Microsoft has been trying to phase out VBA and move to Javascript. If this happens, this could significantly impact whether or not his packages will work.

  • While his website and packages are still available here, some sections are/may become unusable. The animations rely on Flash, which is being phased out in google chrome and other web browsers.

This python package aims to accomplish some of the same goals as Paul Jensen’s website and add-ins did, mainly to

  1. Be an educational tool that shows how abstract models (linear programs, integer programs, nonlinear programs, etc.) can be applied to real-life scenarios to solve complex problems.

  2. Help the practitioner by providing modeling frameworks, methods for solving these models, and problem classes so a user can more easily see how they may be able to frame their business problem/objective through the lens of Operations Research.

This repository contains subpackages for grouping the different types of OR Models & Methods. Currently this subpackage list includes

  1. mathprog: A subpackage for mathematical programs, including linear programs, mixed integer linear programs, nonlinear programs, and stochastic programs. Note for this subpackage that models and methods are not necessarily implemented in their abstract form, like Paul Jensen did - there are many python libraries that accomplish this task far better than I could (Pyomo, PuLP, GLPK to name a few). Thus, this subpackage here is dedicated to providing many problem classes, which show how these can be applied to real-life problems and provide an abstract/concrete model for that particular class of problems. Note that the abstract models can be built upon based on a unique business problem that may have more or fewer constraints, or a more complex objective to maximize/minimize.

Installation

$ pip install ormm

Usage

The mathprog subpackage currently has 4 problem classes, as well as functions for printing the solution of a solved concrete model and for returning a pandas dataframe containing information for sensitivity analysis. The four problem classes are

  1. Resource Allocation: Optimize using scarce resources for valued activities.

from ormm.mathprog import resource_allocation
model = resource_allocation()
  1. Blending Problem: Optimize the mixing of ingredients to satisfy requirements while minimizing cost.

from ormm.mathprog import blending
model = blending()
  1. Employee Scheduling: Minimize the number of workers hired while meeting the minimum number of workers required for each period.

from ormm.mathprog import scheduling
model = scheduling(prob_class="employee")
  1. Rental Scheduling: Minimize the cost of the plans purchased (which rent units for different amounts of time) while satisfying the number of units needed for each period.

from ormm.mathprog import scheduling
model = scheduling(prob_class="rental")

For more details on optional parameters, usage, and the problem descriptions, see the documentation.

Developer Environment

To use the same packages used in development (for creating additions / modifications), you may use the bash command below to install the dev requirements (recommended to do this in your virtualenv). This includes being able to run tests and add to the documentation. .. code:: console

$ pip install -e .[dev]

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ormm-0.0.3.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

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

ormm-0.0.3-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file ormm-0.0.3.tar.gz.

File metadata

  • Download URL: ormm-0.0.3.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.4

File hashes

Hashes for ormm-0.0.3.tar.gz
Algorithm Hash digest
SHA256 0b61b8421245847e1cf90131e1ddcc50fff20b87eea1b52d4770d821954a9de5
MD5 ec50575de3490e103fa5d5f14474f504
BLAKE2b-256 3645217ae56051fd200437536ff13dafcc19bed44008eaf7b81e1162e7c176a8

See more details on using hashes here.

File details

Details for the file ormm-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: ormm-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.4

File hashes

Hashes for ormm-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 eca14f1f96d1b084b44f30ac56b963cffbce4f0c761b5b3623a1bf9b30c2c658
MD5 2964d3b70283e0e1b89e7b339cef1e3a
BLAKE2b-256 d9c5a165b669e9467f8dbac9f02410699527a071806b4a3679e66999fd40aa63

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.0

2 files

This release

0.0.3 This release

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page