Skip to main content

A package for solving various optimization problems. Developed by Ramanujan Computing Centre, Anna University.

Project description

VROR

VROR is a Python package designed to solve various optimization problems. It includes implementations for Critical Path Method (CPM), graphical methods for linear programming, simplex method, transportation problems, and assignment problems. Installation

You can install VROR from PyPI using pip:

pip install vror

Usage Critical Path Method (CPM)

Find the critical path in a project network.

from vror.cpm import create_graph, add_event, find_critical_path, visualize_graph

# Create a graph and add events
graph = create_graph()
add_event(graph, 'A', 0, 5)
add_event(graph, 'B', 2, 10)
add_event(graph, 'C', 4, 8)
add_event(graph, 'D', 6, 2)
add_event(graph, 'E', 8, 6)

# Find the critical path
critical_path = find_critical_path(graph)
print(f'Critical Path: {critical_path}')

# Visualize the graph
visualize_graph(graph)

Graphical Method

Solve linear programming problems using graphical methods.

from vror.graphical_method import graphical_method

# Define constraints and objective function
constraints = [
    (1, 2, 4),  # x + 2y <= 4
    (1, -1, 1), # x - y <= 1
]
objective = (2, 3)  # Maximize 2x + 3y

# Solve the problem
solution = graphical_method(constraints, objective)
print(f'Solution: {solution}')

Simplex Method

Solve linear programming problems using the simplex algorithm.

from vror.simplex_method import simplex

# Define the objective function and constraints
objective = [-1, -2]  # Maximize -x - 2y
constraints = [
    [1, 2, 6],   # x + 2y <= 6
    [3, 2, 12],  # 3x + 2y <= 12
]
bounds = [(0, None), (0, None)]  # x >= 0, y >= 0

# Solve the problem
result = simplex(objective, constraints, bounds)
print(f'Result: {result}')

Transportation Problems

Solve transportation problems using optimization techniques.

from vror.transportation import transportation

# Define supply, demand, and cost matrix
supply = [20, 30, 25]
demand = [10, 25, 20]
cost_matrix = [
    [8, 6, 10],
    [9, 12, 13],
    [14, 9, 16]
]

# Solve the transportation problem
solution = transportation(supply, demand, cost_matrix)
print(f'Transportation Solution: {solution}')

Assignment Problems

Solve assignment problems, typically using the Hungarian algorithm.

from vror.assignment import assignment

# Define cost matrix
cost_matrix = [
    [10, 19, 8, 15],
    [10, 18, 7, 17],
    [13, 16, 9, 14],
    [12, 19, 8, 18]
]

# Solve the assignment problem
solution = assignment(cost_matrix)
print(f'Assignment Solution: {solution}')

Contributing

If you'd like to contribute to VROR, please fork the repository and submit a pull request. For more details, refer to the contributing guidelines. License

VROR is licensed under the MIT License. See the LICENSE file for more details. Contact

For any questions or issues, please contact:

Author: Ragu and Team
Email: https.ragu@gmail.com

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

vror-0.1.4.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

vror-0.1.4-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file vror-0.1.4.tar.gz.

File metadata

  • Download URL: vror-0.1.4.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.5

File hashes

Hashes for vror-0.1.4.tar.gz
Algorithm Hash digest
SHA256 61f352510a706832dbd911ab65e53700bf75e45a4788da3c0f218198fadc54f2
MD5 247071406edd6860a785b451e916b2b4
BLAKE2b-256 2789154797fe2b04847d3417f9cfbcac6dc3205ce0fbad757a040a3dbf334318

See more details on using hashes here.

File details

Details for the file vror-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: vror-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.5

File hashes

Hashes for vror-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cc876ced099cf8afdf79f702ca97e553a947eb83ce83269589bd9b619a5d0c89
MD5 78d27ccdb8724ae215563fb44337662b
BLAKE2b-256 1cb86545b4dda62ec380c0186415e2898220eeebb9918625a9823301486162f3

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