-
Notifications
You must be signed in to change notification settings - Fork 152
Full dimensional polytope computation #370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Full dimensional polytope computation #370
Conversation
vissarion
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition! Very useful for volesti workflows!
I started reviewing it. I have some comments but mainly I couldn't build the examples getting
-- The C compiler identification is GNU 12.3.0
...
-- Boost Library found: /usr/include
-- lp_solve library not found locally, downloading it.
-- Using downloaded lp_solve at: /home/vissarion/workspace/volesti/external/cmake-files/../_deps/lpsolve-src
-- SuiteSparse library not found locally, downloading it.
-- Configuring SuiteSparse...
CMake Error at /home/vissarion/workspace/volesti/external/cmake-files/SuiteSparse.cmake:49 (message):
SuiteSparse configuration failed: CMake Error: The source directory
"/home/vissarion/workspace/volesti/external/_deps/suitesparse-build/spqr""
does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
Call Stack (most recent call first):
CMakeLists.txt:66 (GetSuiteSparse)
I will continue reviewing.
|
|
||
| ### Commit Version | ||
|
|
||
| The integration uses SuiteSparse commit: `d558c83006d63d1dc62004f30042b3ca484f3f94` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not a stable release? eg. https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/v7.12.1
| std::cout << " ALL EXAMPLES COMPLETED" << std::endl; | ||
| std::cout << std::string(70, '=') << std::endl; | ||
|
|
||
| std::cout << "\nKEY TAKEAWAYS:" << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those can be removed ;)
|
|
||
| // Run all examples | ||
| example_canonical_simplex(); | ||
| std::cout << "\nPress Enter for next example..."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no similar cases in other examples I think it is simpler without user interference
| Aqr.compute(Aeq); | ||
| VT shift = Aqr.solve(beq); | ||
|
|
||
| // If eigen fails try with SuiteSparse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why falling back to suitesparse? Is eigen expected to be faster than suitesparse?
Add SuiteSparse Integration and Full Dimensional Polytope Support
Summary
This PR adds comprehensive support for the
compute_full_dimensional_polytopefunction by integrating SuiteSparse (SPQR/CHOLMOD) into the VolEsti build system, along with extensive tests and educational examples.Changes
1. SuiteSparse Integration
New:
external/cmake-files/SuiteSparse.cmake- CMake module for automatic SuiteSparse download, build, and configurationd558c83006d63d1dc62004f30042b3ca484f3f94external/_deps/suitesparse-build/install/Updated:
test/CMakeLists.txt- Added SuiteSparse dependency and linking for new test targets2. Comprehensive Test Suite
test/full_dimensional_polytope_test.cpp(575 lines) - 9 test cases covering:3. Examples
New:
examples/full_dimensional_polytope/directory with:full_dimensional_example.cpp(387 lines) - Interactive program with 6 examples:CMakeLists.txt- Proper build configuration with SuiteSparse linkingREADME.md- Complete documentation with:Technical Details
Function:
compute_full_dimensional_polytope(Aeq, beq, A, b)Input: Polytope
P = {x : Aeq*x = beq, A*x ≤ b}(lower-dimensional)Output:
A_full: Transformed inequality matrixb_full: Transformed inequality vectorshift: Point satisfyingAeq*shift = beqN: Orthonormal nullspace basis satisfyingAeq*N = 0Transformation:
x = shift + N*ymaps from reduced space to original spaceImplementation:
Aeq^TAeq*x = beqDependencies
Building
Tests
Examples
Testing Results
All 9 tests pass and verify:
Files Added/Modified
Added
external/cmake-files/SuiteSparse.cmake(151 lines)external/cmake-files/README_SuiteSparse.md(66 lines)test/full_dimensional_polytope_test.cpp(575 lines)examples/full_dimensional_polytope/full_dimensional_example.cpp(387 lines)examples/full_dimensional_polytope/CMakeLists.txt(112 lines)examples/full_dimensional_polytope/README.md(80 lines)Modified
test/CMakeLists.txt- Added SuiteSparse integration and test registrationRelated
include/preprocess/full_dimensional_polytope.hppexternal/cmake-files/README_SuiteSparse.md