New Feature: Quadratic Constraints (QC) - #61
Open
Lhongpei wants to merge 3 commits into
Open
Conversation
This file contains hidden or 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
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.
🚀 Summary of Changes
This pull request introduces support for Quadratic Constraints (QC) in the
.QPS/.mpsfile format, extending the package's capability from Quadratic Programming (QP) to Quadratically Constrained Quadratic Programming (QCQP).This enhancement allows users to define constraints of the form$L_i \le a_i^\top x + x^\top Q_i x \le U_i$ .
✨ Key Features and Updates
QPSDatanow includes theqcdatafield (Dict{Int, Tuple{Vector{Int}, Vector{Int}, Vector{Float64}}}) to store the constraint-specific quadratic terms (QCMATRIXsection header in the.QPS/.mpsfile.README.mdhas been revised to reflect the new, more general problem format (including📖 Updated Problem Format (README.md)
The problem format now officially supported is:
🛠️ Implementation Details
src/readqps.jl:const QCMATRIX = 11to section headers.read_card!to recognize and handle theQCMATRIXsection, which requires a row name (card.f2).read_qcmatrix_line!to process the variable indices and values for the quadratic constraint matrixcurrent_qc_row_idx).readqpsto trackcurrent_qc_row_idxand handle the initialization and processing of theQCMATRIXsection.This change significantly broadens the class of optimization problems that can be read by
QPSReader.jl.