Skip to content
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

merge dev/qcqp to master #215

Draft
wants to merge 119 commits into
base: master
Choose a base branch
from
Draft

merge dev/qcqp to master #215

wants to merge 119 commits into from

Conversation

kibaekkim
Copy link
Collaborator

No description provided.

x1 x1 2
x2 x2 1
QCMATRIX QC1
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gbyeon looks like you already implemented some code to parse this?

@@ -164,6 +166,83 @@ DSP_RTN_CODE BdSub::loadProblem(DecModel* model)

/** load problem */
cglp_[i]->si_->loadProblem(*mat_reco, clbd_reco, cubd_reco, obj_reco, rlbd_reco, rubd_reco);
/** add quadratic constraints */
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gbyeon did you implement the benders too?

Comment on lines +328 to +331
if (clbd_core_[i][idx] < 0.0)
clbd_core_[i][idx] = 0.0;
if (clbd_core_[i][idx] > 1.0)
cubd_core_[i][idx] = 1.0;
Copy link
Collaborator Author

@kibaekkim kibaekkim Feb 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should just set 0 and 1 for the bounds of binary variable. @gbyeon please let me know if you agree.

@@ -57,11 +57,11 @@ if (NOT ${CPLEX_LIB_DIR} STREQUAL "")
endif()

if(NOT ${GUROBI_LIB_DIR} STREQUAL "")
find_library(GUROBILIB NAMES gurobi90 PATHS ${GUROBI_LIB_DIR})
find_library(GUROBILIB NAMES gurobi91 PATHS ${GUROBI_LIB_DIR})
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be independent to versions?

Copy link
Collaborator Author

@kibaekkim kibaekkim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment to my self: Reviewing the code; still need to review src/Model/StoModel.cpp

@codecov-commenter
Copy link

codecov-commenter commented Mar 1, 2022

Codecov Report

Merging #215 (11be179) into master (ce958d3) will decrease coverage by 0.57%.
The diff coverage is 0.32%.

@@            Coverage Diff             @@
##           master     #215      +/-   ##
==========================================
- Coverage   13.31%   12.73%   -0.58%     
==========================================
  Files          90       92       +2     
  Lines       12353    12920     +567     
==========================================
+ Hits         1645     1646       +1     
- Misses      10708    11274     +566     
Impacted Files Coverage Δ
src/DspCInterface.cpp 11.05% <0.00%> (ø)
src/Model/DecBlkModel.h 0.00% <0.00%> (ø)
src/Model/DecModel.h 50.00% <ø> (ø)
src/Model/DecTssModel.h 3.57% <0.00%> (-0.14%) ⬇️
src/Model/StoModel.cpp 0.15% <0.00%> (-0.08%) ⬇️
src/Model/StoModel.h 9.33% <0.00%> (-0.13%) ⬇️
src/Solver/Deterministic/DeDriver.cpp 0.00% <0.00%> (ø)
src/Solver/DualDecomp/DdMW.h 0.00% <ø> (ø)
src/Solver/DualDecomp/DdMWSerial.cpp 0.00% <0.00%> (ø)
src/Solver/DualDecomp/DdMasterTr.cpp 0.00% <0.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce958d3...11be179. Read the comment docs.

@@ -492,8 +512,842 @@ void split(const std::string& str, Container& cont)
back_inserter(cont));
}

void addAffineRowOfL(double * L, int n, vector<int> indices, CoinPackedVector ** &rows_core_temp, int cstart_of_col_to_add, int rstart_of_row_to_add, int linnzcnt, int *linind, double *linval)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gbyeon Can you add a brief description about this function?

Comment on lines 200 to 201
DSP_RTN_CODE chgToSocp(vector<int> &qc_rstart);
void getL(double * &Q, int quadnzcnt, int *quadcol, int *quadrow, double *quadval, vector<int> &indices, int &n);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gbyeon Can you also add a description for each function?

Copy link
Collaborator Author

@kibaekkim kibaekkim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some questions to be answered. Please find my questions to you @gbyeon

gbyeon and others added 8 commits March 4, 2022 12:16
- It eliminates the need to use Chg_To_Socp for solving a problem with coupling qcs using `dd` and `de`, i.e., Chg_To_Socp = false is recommended.
- It allows coupling qc to be input both from smps files and DSPopt.jl
- Currently, only CPLEX is available for solving a problem with coupling qcs. To extend it to Gurobi and Scip, `addRows` and `chgRhs` should be added in DspOsiScip.h and DspOsiGrb.h
@kibaekkim kibaekkim linked an issue Mar 25, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants