Skip to content

Commit 488abca

Browse files
committed
Upgrade COPT header to 7.2.2
1 parent 4f1bd4e commit 488abca

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

thirdparty/solvers/copt/copt.h

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
#endif
99

1010
#ifdef _WIN32
11+
#if defined(__MINGW64__)
12+
#define COPT_INT64 long long
13+
#else
1114
#define COPT_INT64 __int64
15+
#endif
1216
#elif defined(__LP64__) || defined(_LP64) || defined(__ILP64__) || defined(_ILP64)
1317
#define COPT_INT64 long
1418
#else
@@ -20,8 +24,8 @@ extern "C" {
2024
#endif
2125

2226
#define COPT_VERSION_MAJOR 7
23-
#define COPT_VERSION_MINOR 1
24-
#define COPT_VERSION_TECHNICAL 4
27+
#define COPT_VERSION_MINOR 2
28+
#define COPT_VERSION_TECHNICAL 2
2529

2630

2731
/*
@@ -55,6 +59,11 @@ extern "C" {
5559
#define COPT_SOS_TYPE1 1
5660
#define COPT_SOS_TYPE2 2
5761

62+
/* Indicator types */
63+
#define COPT_INDICATOR_IF 1
64+
#define COPT_INDICATOR_ONLYIF 2
65+
#define COPT_INDICATOR_IFANDONLYIF 3
66+
5867
/* Cone types */
5968
#define COPT_CONE_QUAD 1
6069
#define COPT_CONE_RQUAD 2
@@ -250,6 +259,9 @@ extern "C" {
250259
#define COPT_DBLINFO_RELAXVALUE "RelaxValue"
251260

252261
/* COPT client config keywords */
262+
#define COPT_CLIENT_CAFILE "CaFile"
263+
#define COPT_CLIENT_CERTFILE "CertFile"
264+
#define COPT_CLIENT_CERTKEYFILE "CertKeyFile"
253265
#define COPT_CLIENT_CLUSTER "Cluster"
254266
#define COPT_CLIENT_FLOATING "Floating"
255267
#define COPT_CLIENT_PASSWORD "PassWord"
@@ -285,6 +297,7 @@ int COPT_CALL COPT_GetLicenseMsg(copt_env *env, char *buff, int buffSize);
285297

286298
int COPT_CALL COPT_CreateProb(copt_env *env, copt_prob **p_prob);
287299
int COPT_CALL COPT_CreateCopy(copt_prob *src_prob, copt_prob **p_dst_prob);
300+
int COPT_CALL COPT_ClearProb(copt_prob *prob);
288301
int COPT_CALL COPT_DeleteProb(copt_prob **p_prob);
289302

290303
int COPT_CALL COPT_LoadProb(copt_prob *prob,
@@ -458,6 +471,19 @@ int COPT_CALL COPT_AddIndicator(copt_prob *prob,
458471
char cRowSense,
459472
double dRowBound);
460473

474+
int COPT_CALL COPT_AddIndicators(copt_prob *prob,
475+
int nInd,
476+
int *indType,
477+
int *binColIdx,
478+
int *binColVal,
479+
const int *rowMatBeg,
480+
const int *rowMatCnt,
481+
const int *rowMatIdx,
482+
const double *rowMatElem,
483+
char *cRowSense,
484+
double *dRowBound,
485+
char const *const *indNames);
486+
461487
int COPT_CALL COPT_GetCols(copt_prob *prob,
462488
int nCol,
463489
const int *list,
@@ -562,6 +588,21 @@ int COPT_CALL COPT_GetIndicator(copt_prob *prob,
562588
int nElemSize,
563589
int *pReqSize);
564590

591+
int COPT_CALL COPT_GetIndicators(copt_prob *prob,
592+
int nInd,
593+
int *list,
594+
int *indType,
595+
int *binColIdx,
596+
int *binColVal,
597+
int *rowMatBeg,
598+
int *rowMatCnt,
599+
int *rowMatIdx,
600+
double *rowMatElem,
601+
char *cRowSense,
602+
double *dRowBound,
603+
int nElemSize,
604+
int *pReqSize);
605+
565606
int COPT_CALL COPT_GetElem(copt_prob *prob, int iCol, int iRow, double *p_elem);
566607
int COPT_CALL COPT_SetElem(copt_prob *prob, int iCol, int iRow, double newElem);
567608
int COPT_CALL COPT_SetElems(copt_prob *prob, int nelem, const int *cols, const int *rows, const double *elems);
@@ -620,6 +661,8 @@ int COPT_CALL COPT_SetPSDConstrNames(copt_prob *prob, int num, const int *list,
620661
int COPT_CALL COPT_SetLMIConstrRhs(copt_prob *prob, int num, const int *list, const int *newIdx);
621662
int COPT_CALL COPT_SetLMIConstrNames(copt_prob *prob, int num, const int *list, char const *const *names);
622663

664+
int COPT_CALL COPT_SetIndicatorNames(copt_prob *prob, int num, const int *list, char const *const *names);
665+
623666
int COPT_CALL COPT_ReplaceColObj(copt_prob *prob, int num, const int *list, const double *obj);
624667
int COPT_CALL COPT_ReplacePSDObj(copt_prob *prob, int num, const int *list, const int *idx);
625668

@@ -698,6 +741,7 @@ int COPT_CALL COPT_GetRowIdx(copt_prob *prob, const char *rowName, int *p_iRow);
698741
int COPT_CALL COPT_GetQConstrIdx(copt_prob *prob, const char *qConstrName, int *p_iQConstr);
699742
int COPT_CALL COPT_GetPSDConstrIdx(copt_prob *prob, const char *psdConstrName, int *p_iPSDConstr);
700743
int COPT_CALL COPT_GetLMIConstrIdx(copt_prob *prob, const char *lmiConstrName, int *p_iLMIConstr);
744+
int COPT_CALL COPT_GetIndicatorIdx(copt_prob *prob, const char *indicatorName, int *p_iIndicator);
701745
int COPT_CALL COPT_GetColInfo(copt_prob *prob, const char *infoName, int num, const int *list, double *info);
702746
int COPT_CALL COPT_GetPSDColInfo(copt_prob *prob, const char *infoName, int iCol, double *info);
703747
int COPT_CALL COPT_GetRowInfo(copt_prob *prob, const char *infoName, int num, const int *list, double *info);
@@ -725,6 +769,7 @@ int COPT_CALL COPT_GetRowName(copt_prob *prob, int iRow, char *buff, int buffSiz
725769
int COPT_CALL COPT_GetQConstrName(copt_prob *prob, int iQConstr, char *buff, int buffSize, int *pReqSize);
726770
int COPT_CALL COPT_GetPSDConstrName(copt_prob *prob, int iPSDConstr, char *buff, int buffSize, int *pReqSize);
727771
int COPT_CALL COPT_GetLMIConstrName(copt_prob *prob, int iLMIConstr, char *buff, int buffSize, int *pReqSize);
772+
int COPT_CALL COPT_GetIndicatorName(copt_prob *prob, int iIndicator, char *buff, int buffSize, int *pReqSize);
728773

729774
int COPT_CALL COPT_SetLogFile(copt_prob *prob, const char *logfilename);
730775
int COPT_CALL COPT_SetLogCallback(copt_prob *prob, void (COPT_CALL *logcb)(char *msg, void *userdata), void *userdata);

0 commit comments

Comments
 (0)