-
Notifications
You must be signed in to change notification settings - Fork 125
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
Simulated annealing for LP heuristics #41
Closed
panagiotisrep
wants to merge
24
commits into
GeomScale:develop
from
panagiotisrep:simulated-annealing-heuristics
Closed
Simulated annealing for LP heuristics #41
panagiotisrep
wants to merge
24
commits into
GeomScale:develop
from
panagiotisrep:simulated-annealing-heuristics
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…std::vector. Made required code updates in polytopes.h, rounding.h,ballintersectconvex.h and updated CMakeLists.txt to include the directory with Eigen.
…plane method, in file "cutting_plane.h". I also added the new test "opt_cutting_plane.cpp"
…n interior_point.h, created lp_generator.h and generate_lp.cpp to create tests. In eigen unsupported changed Macros.h so instead of assert it throws exceptions.
Most of the code is refactored. Remove from external libraries unwanted dependencies and make necessary changes so that efficiency is maximized and avoid duplicate operations. In particular: - minimal inclusion for Eigen Unsupported: keep only what is required for square root of matrix - /include/generators/lp_generator.h creates lp tests - /include/optimization/lp_problem.h is the class that handles linear problems - /include/optimization/cutting_plane.h holds the two randomized cutting plane algorithms (with and without implicit isotropization) - /include/samplers/samplers.h deleted some functions - /test/opt_cutting_plane.cpp make appropriate changes when calling new functions
- /include/convex_bodies/polytopes.h add a new function that does ray shooting and also returns the facets the ray hits - /include/optimization/cutting_plane.h implemented the following heuristics: at each phase sample 1 point and cut the polytope, as an escape step try to move to the center of the Chebyshev ball or use the billiard walk
- /include/convex_bodies/spectrahedron.h the class which will hold the linear matrix inequality describing a spectrahedron - /include/optimization/cutting_plane_sdp.h the randomized cutting plane method coded for spectrahedra - /include/optimization/sdp_problem.h The class which will manage the SDP optimization problem - /include/samplers/samplers.h added functions for hit and run sor spectrahedra - /tests/opt_cutting_plane_sdp.cpp the main which will be used to test the new algorithm implementation - /tests/CMakeLists.txt added the new executable opt_cutting_plane_sdp
- /include/convex_bodies/spectrahedron.h changed constructor - /include/optimization/sdp_problem add method to read from file
- /include/convex_bodies/spectrahedron.h added boundary oracle - /include/optimization/cutting_plane_sdp.h implemented randomized cutting plane algorithm for sdp - /include/sdp_problem.h transform lp to sdp, solve sdp methods - /include/test/opt_cutting_plane_sdp.cpp a test main to test the algorithm
- /include/convex_bodies/spectrahedron.h added boundary oracle - /include/optimization/cutting_plane_sdp.h implemented randomized cutting plane algorithm for sdp - /include/sdp_problem.h transform lp to sdp, solve sdp methods - /include/test/opt_cutting_plane_sdp.cpp a test main to test the algorithm
- /include/convex_bodies/spectrahedron.h added method for checking positive/negative definiteness - /include/generators/sdp_generator.h creates sdp problems - /include/optimization/interior_point_sdp.h finds a strictly feasible point in a spcectrahedron - /include/sdp_problem.h edit it to find a initial point to pass it to cutting plane method - /include/test/generate_sdp.cpp a main to create tests for SDP
- /include/convex_bodies/spectrahedron.h add method to check if matrix is singular - /include/samplers/samplers.h edit hit & run to use sample covariance matrix heuristic - /include/optimization/cutting_plane_sdp.h implemented randomized cutting plane algorithm with sample covariance matrix heuristic - /include/sdp_problem.h select to use sample covariance matrix heuristic or not - /include/test/opt_cutting_plane_sdp.cpp a test main to test the algorithm
A simple implementation to read and export SDP programs in SDPA format. In this version only comments at the beginning and then numbers are allowed, no brackets, commas or parentheses. - /include/optimization/SDPA_format_manager.h functions to export/import SDPA format files - /include/sdp_problem.h methods to read/write files in SDPA format - /include/test/opt_cutting_plane_sdp.cpp edit the test main to read SDPA format files
Implementation of the sampled covariance matrix heuristic for LPs. The implementation was already in file cutting_plane_sdp.h, so it just needed to be moved to a new file. - /include/optimization/cutting_plane_sdp.h moved away the implementation of the heuristic - /include/optimization/heuristics.h the implementation of the heuristic is here - /include/optimization/cutting_plane.h a previous version of this heuristic was already implemented for LPs. Deleted the previous one and edited to use the new version - /include/lp_problem.h edit to use the heuristic if prompted - /include/test/opt_cutting_plane.cpp edit the test main to use the heuristic if prompted by user
Implementation of a deterministic cutting plane method. At each step, the polytope is cut at the approximated Chebyshev center. - /include/optimization/cutting_plane.h add deterministic cutting plane method - /include/lp_problem.h edit to use the new algorithm - /include/test/opt_cutting_plane.cpp edit the test main to use the new algorithm
Correction in sdp_generator.h - the tests created were wrong
- /include/convex_bodies/spectrahedron.h added methods to check if the matrix from evaluating a LMI is singular - /include/optimization/cutting_plane_sdp.h changed stopping criterion - /test/generate_sdp.cpp edit it to produce problems in SDPA format
Implementation of simulation annealing for convex optimization - /include/convex_bodies/polytopes.h add method to calculate the distances from closest/farthest point from given point - /include/optimization/lp_problem.h add the option to use simulated annealing to solve LP problems - /include/optimization/simulated_annealing.h the implementation of the algorithm - /include/optimization/truncated_exponential.h implement a method to sample from the truncated exponential distribution - /include/samplers/samplers.h add methods to use hit and run to sample w.r.t. the Boltzmann distribution - /test/opt_cutting_plane.cpp add the option to use simulated annealing to solve LP problems
Added two heuristics for the simulated annealing algorithm, the set directions heuristic and a more efficient computation of the covariance matrix. - include/optimization/lp_problem.h edit to choose the new heuristics - include/optimization/simulated_annealing.h the implementations of the heuristics - test/opt_cutting_plane.cpp edit to choose the new heuristics
Added a sliding window of size 100 + d^{2.5} to determine when to stop the random walk. - include/optimization/simulated_annealing.h edit the walk length
vissarion
changed the title
Simulated annealing heuristics
Simulated annealing for LP heuristics
Feb 19, 2020
vissarion
force-pushed
the
develop
branch
4 times, most recently
from
February 27, 2020 13:27
a723d21
to
9b01ec6
Compare
vissarion
force-pushed
the
develop
branch
7 times, most recently
from
February 27, 2020 15:06
e4ac563
to
ca784f5
Compare
A more efficient algorithm is implemented here #42 making this PR redundant. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On previous pull request I implemented the simulated annealing algorithm for convex optimization from Kalai and Vempala, “Simulated Annealing for Convex Optimization.” for polytopes (linear optimization).
Now I test new heuristics and implement a more efficient version.
More info on implementation / testing here.