From 1c8d5cb49cca7273b0e72877cd88646f4c4d5a6f Mon Sep 17 00:00:00 2001 From: "Laio O. Seman" Date: Tue, 19 Dec 2023 14:50:16 -0300 Subject: [PATCH] Update README.md --- README.md | 66 ++++++++++++++++++++----------------------------------- 1 file changed, 24 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index c24c80b..5fe7dff 100644 --- a/README.md +++ b/README.md @@ -2,61 +2,43 @@ ## IPM Solver for BCP in LP ### Description - -This project implements an Interior Point Method (IPM) solver for Branch-Cut-Price (BCP) in Linear Programming (LP). It is designed to efficiently solve large-scale LP problems using advanced numerical techniques. The solver is crafted as a library for use in Python, leveraging the capabilities of pybind11. +IPyM is a Python-based Interior Point Method (IPM) solver tailored for Branch-Cut-Price (BCP) in Linear Programming (LP). It efficiently tackles large-scale LP problems using advanced numerical techniques and integrates seamlessly with Python through pybind11. ### Dependencies +- **Eigen**: A versatile C++ template library for linear algebra. +- **Cholmod**: Specialized in solving sparse linear systems. +- **pybind11**: Facilitates C++ and Python interoperability. - - Eigen: A C++ template library for linear algebra. - - Cholmod: A library for solving sparse linear systems. - - pybind11: A lightweight header-only library that exposes C++ types in Python and vice versa. - -To ensure full functionality, make sure these dependencies are properly installed and configured in your environment. +*Ensure these dependencies are installed and configured in your environment for optimal functionality.* ### Solving Method - -The *AUGMENTED* definition changes the compilation to use an augmented matrix form. +Utilize the *AUGMENTED* definition to compile with an augmented matrix form. ### Installation - -To install this project, follow these steps: - - - Install CMake, which will be used to build the project. - - Clone the repository: git clone [repository-url]. - - Navigate to the project directory: cd [project-directory]. - - Create a build directory and navigate into it: mkdir build && cd build. - - Run CMake to configure the project: cmake ... - - Build the project: cmake --build .. +1. Install CMake for building the project. +2. Clone the repository: `git clone [repository-url]`. +3. Navigate to the project directory: `cd [project-directory]`. +4. Create and enter the build directory: `mkdir build && cd build`. +5. Configure with CMake: `cmake ...`. +6. Build the project: `cmake --build ..`. ### Usage - -First, ensure that the library is properly imported in your Python script: - -``` +Import the library in your Python script: +```python import ipy_selfdual as ipy ``` - -Then, you can use the run_optimization function as follows: - -``` -# Define your problem parameters -A = ... # Coefficient matrix -b = ... # Right-hand side vector -c = ... # Cost vector -lo = ... # Lower bounds for variables -hi = ... # Upper bounds for variables -sense = ... # Constraint sense -tol = ... # Tolerance - -# Run the optimization +Optimize using `run_optimization`: +```python +# Define problem parameters +A, b, c = ... # Coefficient matrix, RHS vector, Cost vector +lo, hi = ... # Variable bounds +sense, tol = ... # Constraint sense, Tolerance + +# Execute optimization x0, lambdas, slacks, obj = ipy.run_optimization(A, b, -c, lo, hi, sense_ipm, tol) -# x0: Solution vector -# lambdas: Dual variables -# slacks: Slack variables -# obj: Objective +# Outputs: Solution vector, Dual variables, Slack variables, Objective value ``` ### Contact - -For any queries or collaborations, please contact Laio Oriel Seman at laio@ieee.org. \ No newline at end of file +For inquiries or collaborations, reach out to Laio Oriel Seman at laio@ieee.org.