-
Notifications
You must be signed in to change notification settings - Fork 6
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
[WIP] Refactor #9
base: master
Are you sure you want to change the base?
Conversation
.vscode/settings.json
Outdated
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.
Please remove this file.
src/NCTSSOS.jl
Outdated
export PolynomialOptimizationProblem | ||
|
||
include("moment_solver.jl") | ||
export MomentMethod, init_moment_vector!, constrain_moment_matrix!, make_sdp, set_total_basis2var_dict!, get_total_basis2var_dict |
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.
Do not export API unless this is very nessesary.
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.
Move export lines together.
This pull request includes significant changes to the
NCTSSOS
project, focusing on restructuring the codebase, introducing new functionalities, and adding comprehensive tests. The most important changes include the reorganization of module imports, the introduction of new types and methods for polynomial optimization problems, and the addition of extensive test cases.Reorganization and Module Imports:
src/NCTSSOS.jl
: Reorganized module imports, removing unused ones and consolidating includes and exports.New Types and Methods:
src/moment_solver.jl
: IntroducedMomentMethod
type and related methods for handling moment matrices in optimization problems.src/pop.jl
: AddedPolynomialOptimizationProblem
type and associated methods for defining and manipulating polynomial optimization problems.src/solver_utils.jl
: Implemented utility functions such asremove_zero_degree
,star
, andsymmetric_canonicalize
for handling polynomial variables and monomials.src/sos_solver.jl
: Addeddualize
method for creating dual optimization models.Testing Enhancements:
test/moment_solver.jl
: Added test cases forMomentMethod
and its methods, including initialization and example usage.test/pop.jl
: Introduced tests forPolynomialOptimizationProblem
to verify the correctness of variable and constraint handling.test/solver_utils.jl
: Added tests for utility functions to ensure proper manipulation of polynomial variables and monomials.test/sos_solver.jl
: Included tests for thedualize
method to validate dual model creation and optimization.These changes collectively enhance the functionality, maintainability, and test coverage of the
NCTSSOS
project.