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

Uploaded Python 3

File details

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

File metadata

  • Download URL: or_models-0.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.tar.gz
Algorithm Hash digest
SHA256 1ad49a227202d304a6beb0603d6cb61a4077131514afc912728c413da8ef29a2
MD5 e9376bf25294752d595bef2bacbddf65
BLAKE2b-256 77ac92784156c96d2edfdd45d3b4343aa38d2a2a51f6ed8ba5cd863d4a07ca04

See more details on using hashes here.

File details

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

File metadata

  • Download URL: or_models-0.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-py3-none-any.whl
Algorithm Hash digest
SHA256 a76c549d094cf69708fa309e00df12f0f09f4577d12f836101ef490a2c92b396
MD5 7f7a83f8b3647666ff96c5d75ce30ca2
BLAKE2b-256 9a6ca4d7812d563bea5f55b41753ad729754fbf487a2196babb96348294474f8

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