Skip to content

Commit

Permalink
add function for converting qcp to socp
Browse files Browse the repository at this point in the history
  • Loading branch information
gbyeon committed Dec 18, 2020
1 parent 2cb3124 commit e37ee6a
Show file tree
Hide file tree
Showing 9 changed files with 956 additions and 59 deletions.
8 changes: 4 additions & 4 deletions examples/quad/farmer4.cor
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ ROWS
COLUMNS
RHS
RHS QC0 1600
RHS QC1 3600
RHS QC1 6400
RHS QC2 1600
QCMATRIX QC0
x1 x1 1
x5 x5 2
QCMATRIX QC1
x1 x1 2
x2 x2 1
QCMATRIX QC1
x1 x1 1
x5 x5 2
QCMATRIX QC2
x5 x5 1
ENDATA
2 changes: 1 addition & 1 deletion examples/quad/farmer4.tim
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
TIME FARMER
PERIODS IMPLICIT
QC0 PERIOD1
QC2 PERIOD2
QC1 PERIOD2
ENDATA
4 changes: 2 additions & 2 deletions src/DspCInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ int readDro(DspApiEnv * env, const char * dro)
}

/** read quad files */
int readQuad(DspApiEnv * env, const char * smps, const char * quad)
int readQuad(DspApiEnv * env, const char * smps, const char * quad, bool chg_to_socp)
{
return getTssModel(env)->readQuad(smps, quad);
return getTssModel(env)->readQuad(smps, quad, chg_to_socp);
}

/** load first-stage problem */
Expand Down
2 changes: 1 addition & 1 deletion src/DspCInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ int readSmps(DspApiEnv * env, const char * smps);
int readDro(DspApiEnv * env, const char * dro);

/** read quad files */
int readQuad(DspApiEnv * env, const char * smps, const char * quad);
int readQuad(DspApiEnv * env, const char * smps, const char * quad, bool chg_to_socp = true);

/** load first-stage problem */
void loadFirstStage(
Expand Down
Loading

0 comments on commit e37ee6a

Please sign in to comment.