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

Uploaded Python 3

File details

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

File metadata

  • Download URL: vror-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 5474974c8533ea0bb50a4017187486556931dd7d0a1ef7773841fd20e3b37634
MD5 5a582921b55f2f2f96d8f1837efefd3c
BLAKE2b-256 952d6110d9f00a420b6dac8d8fb895468fed9a2215a8cdd4d57b2af152d31849

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vror-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e86180bfcb027ba7931300a8b76ca0844d87c7c56521462ee3ba5a91ee57b237
MD5 d154c93ff099396112e168095883319b
BLAKE2b-256 b13020296553a366ba510d0997b5524c825ea1e7aeca7d237472966dc7298f56

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