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})
    

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.1.1.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.1.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: or_models-0.1.1.1.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.1.1.tar.gz
Algorithm Hash digest
SHA256 5deda2abd057ec268336222f1db5d51d2511cf92810a791141f670d5f6247524
MD5 a4ec2cfa5126088eb00c44b08b5e4976
BLAKE2b-256 526ce84560f4eac3dd576ebefd0df23a99e6be5abdb61d9d1c7aa78d556e2232

See more details on using hashes here.

File details

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

File metadata

  • Download URL: or_models-0.1.1.1-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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b5219173b0f8817bbff2c90a95c8b538f72aa567cfa294515e8daa4ac6328e10
MD5 2572990f8ece8d8f00f0613283a0262c
BLAKE2b-256 c559d2b3578d609e2d5ec9f53914f947173516e436a94df8d750b4fa07b4db16

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