Skip to main content

Some standard textbook Optimization Models and Algorithms.

Project description

or_models (Operations Research Models)

Mathematical Optimization Models and Algorithms

How to Install

You can use pip to install the code:

> pip install or_models

Models Included:

  1. Set Covering Problem: Create an SCP object

    >>> costs = np.array([2,3,4,5])
    >>> matrix = np.array([[1,0,1,0],
                           [1,0,0,1],
                           [0,1,1,1]])
    >>> scp = SCP(costs,matrix)
    

    Solve with a MIP model created using Google OR-tools

    >>> scp.solve_with_GOR()
    

    Solve using Lagrange Relaxation method with some modification as discussed in Beasley, John E. "A lagrangian heuristic for set‐covering problems." Naval Research Logistics (NRL) 37.1 (1990): 151-164.

    >>> output = scp.LR_method(scp.row_least_cost,numIterations=1000)
    >>> print(output)
    (5, {0: 1, 1: 1})
    

    Create instance using Beasley Dataset

    >>> 
    

Dependencies

  • google or-tools
  • numpy
  • time

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

or_models-0.1.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

or_models-0.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: or_models-0.1.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for or_models-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e22a7e44f0a832df2c50f4d788b95d0fc5c3ceb55436a9573c6250638287cd1d
MD5 6f8eefa9d30a338f8c57535c77ad8838
BLAKE2b-256 563ffa3735d9d5635ec4496e42ffdaa4b067b6428f1b1811b0ec923bd167282b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: or_models-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for or_models-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce2b735ec0590d5b74928506832f81436fdb01b0744d6ed54ef3d4ca944a4168
MD5 2e0d18f97735255d955ed4e2e96b3e30
BLAKE2b-256 61cd34bec928a0ca7fc382d1158bbc43ecaa4135249a1c3eaf8c136ce91c0aef

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