Skip to content

Commit

Permalink
Update solver constants
Browse files Browse the repository at this point in the history
  • Loading branch information
metab0t committed Nov 27, 2024
1 parent 0cf9a6e commit c19795c
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 15 deletions.
11 changes: 10 additions & 1 deletion lib/copt_model_ext_constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ void bind_copt_constants(nb::module_ &m)
COPT.attr("CBCONTEXT_MIPNODE") = 4;
COPT.attr("CBCONTEXT_MIPRELAX") = 1;
COPT.attr("CBCONTEXT_MIPSOL") = 2;
COPT.attr("CLIENT_CAFILE") = "CaFile";
COPT.attr("CLIENT_CERTFILE") = "CertFile";
COPT.attr("CLIENT_CERTKEYFILE") = "CertKeyFile";
COPT.attr("CLIENT_CLUSTER") = "Cluster";
COPT.attr("CLIENT_FLOATING") = "Floating";
COPT.attr("CLIENT_PASSWORD") = "PassWord";
Expand All @@ -30,6 +33,8 @@ void bind_copt_constants(nb::module_ &m)
COPT.attr("CONE_RQUAD") = 2;
COPT.attr("CONTINUOUS") = "C";
COPT.attr("EQUAL") = "E";
COPT.attr("EXPCONE_DUAL") = 4;
COPT.attr("EXPCONE_PRIMAL") = 3;
COPT.attr("FREE") = "N";
COPT.attr("GENCONSTR_ABS") = 1;
COPT.attr("GENCONSTR_AND") = 2;
Expand All @@ -39,6 +44,9 @@ void bind_copt_constants(nb::module_ &m)
COPT.attr("GENCONSTR_PWL") = 6;
COPT.attr("GREATER_EQUAL") = "G";
COPT.attr("IMPRECISE") = 7;
COPT.attr("INDICATOR_IF") = 1;
COPT.attr("INDICATOR_IFANDONLYIF") = 3;
COPT.attr("INDICATOR_ONLYIF") = 2;
COPT.attr("INFEASIBLE") = 2;
COPT.attr("INFINITY") = 1e+30;
COPT.attr("INF_OR_UNB") = 4;
Expand All @@ -59,7 +67,7 @@ void bind_copt_constants(nb::module_ &m)
COPT.attr("UNFINISHED") = 9;
COPT.attr("UNSTARTED") = 0;
COPT.attr("VERSION_MAJOR") = 7;
COPT.attr("VERSION_MINOR") = 1;
COPT.attr("VERSION_MINOR") = 2;
COPT.attr("VERSION_TECHNICAL") = 3;

nb::module_ Attr = COPT.def_submodule("Attr");
Expand All @@ -71,6 +79,7 @@ void bind_copt_constants(nb::module_ &m)
Attr.attr("Cols") = "Cols";
Attr.attr("Cones") = "Cones";
Attr.attr("Elems") = "Elems";
Attr.attr("ExpCones") = "ExpCones";
Attr.attr("FeasRelaxObj") = "FeasRelaxObj";
Attr.attr("HasBasis") = "HasBasis";
Attr.attr("HasDualFarkas") = "HasDualFarkas";
Expand Down
65 changes: 51 additions & 14 deletions lib/gurobi_model_ext_constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,23 @@ void bind_gurobi_constants(nb::module_ &m)
GRB.attr("FEASRELAX_QUADRATIC") = 1;
GRB.attr("GENCONSTR_ABS") = 2;
GRB.attr("GENCONSTR_AND") = 3;
GRB.attr("GENCONSTR_COS") = 15;
GRB.attr("GENCONSTR_EXP") = 9;
GRB.attr("GENCONSTR_EXPA") = 10;
GRB.attr("GENCONSTR_INDICATOR") = 6;
GRB.attr("GENCONSTR_LOG") = 11;
GRB.attr("GENCONSTR_LOGA") = 12;
GRB.attr("GENCONSTR_LOGISTIC") = 17;
GRB.attr("GENCONSTR_COS") = 16;
GRB.attr("GENCONSTR_EXP") = 10;
GRB.attr("GENCONSTR_EXPA") = 11;
GRB.attr("GENCONSTR_INDICATOR") = 7;
GRB.attr("GENCONSTR_LOG") = 12;
GRB.attr("GENCONSTR_LOGA") = 13;
GRB.attr("GENCONSTR_LOGISTIC") = 18;
GRB.attr("GENCONSTR_MAX") = 0;
GRB.attr("GENCONSTR_MIN") = 1;
GRB.attr("GENCONSTR_NL") = 6;
GRB.attr("GENCONSTR_NORM") = 5;
GRB.attr("GENCONSTR_OR") = 4;
GRB.attr("GENCONSTR_POLY") = 8;
GRB.attr("GENCONSTR_POW") = 13;
GRB.attr("GENCONSTR_PWL") = 7;
GRB.attr("GENCONSTR_SIN") = 14;
GRB.attr("GENCONSTR_TAN") = 16;
GRB.attr("GENCONSTR_POLY") = 9;
GRB.attr("GENCONSTR_POW") = 14;
GRB.attr("GENCONSTR_PWL") = 8;
GRB.attr("GENCONSTR_SIN") = 15;
GRB.attr("GENCONSTR_TAN") = 17;
GRB.attr("GREATER_EQUAL") = ">";
GRB.attr("INFEASIBLE") = 3;
GRB.attr("INFINITY") = 1e+100;
Expand Down Expand Up @@ -118,6 +119,24 @@ void bind_gurobi_constants(nb::module_ &m)
GRB.attr("NONBASIC_LOWER") = -1;
GRB.attr("NONBASIC_UPPER") = -2;
GRB.attr("NUMERIC") = 12;
GRB.attr("OPCODE_CONSTANT") = 0;
GRB.attr("OPCODE_COS") = 10;
GRB.attr("OPCODE_DIVIDE") = 5;
GRB.attr("OPCODE_EXP") = 13;
GRB.attr("OPCODE_LOG") = 14;
GRB.attr("OPCODE_LOG10") = 16;
GRB.attr("OPCODE_LOG2") = 15;
GRB.attr("OPCODE_LOGISTIC") = 17;
GRB.attr("OPCODE_MINUS") = 3;
GRB.attr("OPCODE_MULTIPLY") = 4;
GRB.attr("OPCODE_PLUS") = 2;
GRB.attr("OPCODE_POW") = 12;
GRB.attr("OPCODE_SIN") = 9;
GRB.attr("OPCODE_SQRT") = 8;
GRB.attr("OPCODE_SQUARE") = 7;
GRB.attr("OPCODE_TAN") = 11;
GRB.attr("OPCODE_UMINUS") = 6;
GRB.attr("OPCODE_VARIABLE") = 1;
GRB.attr("OPTIMAL") = 2;
GRB.attr("PARTITION_CLEANUP") = 1;
GRB.attr("PARTITION_EARLY") = 16;
Expand Down Expand Up @@ -152,13 +171,14 @@ void bind_gurobi_constants(nb::module_ &m)
GRB.attr("VARBRANCH_PSEUDO_REDUCED") = 0;
GRB.attr("VARBRANCH_PSEUDO_SHADOW") = 1;
GRB.attr("VARBRANCH_STRONG") = 3;
GRB.attr("VERSION_MAJOR") = 11;
GRB.attr("VERSION_MAJOR") = 12;
GRB.attr("VERSION_MINOR") = 0;
GRB.attr("VERSION_TECHNICAL") = 2;
GRB.attr("VERSION_TECHNICAL") = 0;
GRB.attr("WORK_LIMIT") = 16;

nb::module_ Attr = GRB.def_submodule("Attr");
Attr.attr("BarIterCount") = "BarIterCount";
Attr.attr("BarPi") = "BarPi";
Attr.attr("BarX") = "BarX";
Attr.attr("BatchErrorCode") = "BatchErrorCode";
Attr.attr("BatchErrorMessage") = "BatchErrorMessage";
Expand Down Expand Up @@ -243,13 +263,15 @@ void bind_gurobi_constants(nb::module_ &m)
Attr.attr("MIPGap") = "MIPGap";
Attr.attr("MaxBound") = "MaxBound";
Attr.attr("MaxCoeff") = "MaxCoeff";
Attr.attr("MaxMemUsed") = "MaxMemUsed";
Attr.attr("MaxObjCoeff") = "MaxObjCoeff";
Attr.attr("MaxQCCoeff") = "MaxQCCoeff";
Attr.attr("MaxQCLCoeff") = "MaxQCLCoeff";
Attr.attr("MaxQCRHS") = "MaxQCRHS";
Attr.attr("MaxQObjCoeff") = "MaxQObjCoeff";
Attr.attr("MaxRHS") = "MaxRHS";
Attr.attr("MaxVio") = "MaxVio";
Attr.attr("MemUsed") = "MemUsed";
Attr.attr("MinBound") = "MinBound";
Attr.attr("MinCoeff") = "MinCoeff";
Attr.attr("MinObjCoeff") = "MinObjCoeff";
Expand Down Expand Up @@ -386,6 +408,7 @@ void bind_gurobi_constants(nb::module_ &m)
Param.attr("Disconnected") = "Disconnected";
Param.attr("DisplayInterval") = "DisplayInterval";
Param.attr("DistributedMIPJobs") = "DistributedMIPJobs";
Param.attr("DualImpliedCuts") = "DualImpliedCuts";
Param.attr("DualReductions") = "DualReductions";
Param.attr("FeasRelaxBigM") = "FeasRelaxBigM";
Param.attr("FeasibilityTol") = "FeasibilityTol";
Expand Down Expand Up @@ -499,6 +522,7 @@ void bind_gurobi_constants(nb::module_ &m)
Param.attr("SubMIPNodes") = "SubMIPNodes";
Param.attr("Symmetry") = "Symmetry";
Param.attr("TSPort") = "TSPort";
Param.attr("ThreadLimit") = "ThreadLimit";
Param.attr("Threads") = "Threads";
Param.attr("TimeLimit") = "TimeLimit";
Param.attr("TokenServer") = "TokenServer";
Expand All @@ -517,6 +541,8 @@ void bind_gurobi_constants(nb::module_ &m)
Param.attr("UserName") = "UserName";
Param.attr("VarBranch") = "VarBranch";
Param.attr("WLSAccessID") = "WLSAccessID";
Param.attr("WLSConfig") = "WLSConfig";
Param.attr("WLSProxy") = "WLSProxy";
Param.attr("WLSSecret") = "WLSSecret";
Param.attr("WLSToken") = "WLSToken";
Param.attr("WLSTokenDuration") = "WLSTokenDuration";
Expand All @@ -542,6 +568,8 @@ void bind_gurobi_constants(nb::module_ &m)
Callback.attr("IIS_CONSTRGUESS") = 9003;
Callback.attr("IIS_CONSTRMAX") = 9002;
Callback.attr("IIS_CONSTRMIN") = 9001;
Callback.attr("MAXMEMUSED") = 6005;
Callback.attr("MEMUSED") = 6004;
Callback.attr("MESSAGE") = 6;
Callback.attr("MIP") = 3;
Callback.attr("MIPNODE") = 5;
Expand Down Expand Up @@ -574,9 +602,18 @@ void bind_gurobi_constants(nb::module_ &m)
Callback.attr("MIP_SOLCNT") = 3003;
Callback.attr("MSG_STRING") = 6001;
Callback.attr("MULTIOBJ") = 8;
Callback.attr("MULTIOBJ_ITRCNT") = 8004;
Callback.attr("MULTIOBJ_MIPGAP") = 8008;
Callback.attr("MULTIOBJ_NODCNT") = 8009;
Callback.attr("MULTIOBJ_NODLFT") = 8010;
Callback.attr("MULTIOBJ_OBJBND") = 8006;
Callback.attr("MULTIOBJ_OBJBST") = 8005;
Callback.attr("MULTIOBJ_OBJCNT") = 8001;
Callback.attr("MULTIOBJ_RUNTIME") = 8011;
Callback.attr("MULTIOBJ_SOL") = 8003;
Callback.attr("MULTIOBJ_SOLCNT") = 8002;
Callback.attr("MULTIOBJ_STATUS") = 8007;
Callback.attr("MULTIOBJ_WORK") = 8012;
Callback.attr("POLLING") = 0;
Callback.attr("PRESOLVE") = 1;
Callback.attr("PRE_BNDCHG") = 1003;
Expand Down

0 comments on commit c19795c

Please sign in to comment.