常量


常量

下面的列表包含Gurobi . net接口所需的常数集。你可以用伽马射线爆发。前缀(例如,GRB.Status.OPTIMAL).


//模型状态代码(调用optimize()后)////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////并且有一个最优的////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////是无界的。//public const int unbounded=5;/////最优目标被证明比截止参数中指定的值差。//public const int Cutoff=6;/////优化终止,因为执行的单纯形///迭代总数超过了指定的限制在IterationLimit///参数中。//public const int ITERATION_LIMIT=7;/////优化终止,因为探索的分支和剪切节点总数超过了NodeLimit///参数中指定的限制。//public const int NODE_LIMIT=8;/////优化终止原因总运行时间///超过了TimeLimit参数中指定的限制。//public const int time_limit=9;/////优化终止,因为找到的解决方案数量///达到了SolutionLimit参数中指定的值。//public const int SOLUTION_limit=10;/////优化已由用户终止。//public const int INTERRUPTED=11;/////由于无法恢复的数值问题,优化已终止。//public const int NUMERIC=12;/////优化已使用次优解决方案终止。//public const int sub optimal=13;/////优化仍在进行中。//public const int INPROGRESS=14;/////用户指定的目标限制(最佳目标///或最佳限制的限制),并且已达到该限制。//public const int User_OBJ_limit=15;}/////批状态代码//公共类批状态{/////批处理对象已创建,但尚未准备好进行计划。///有关详细信息,请参阅手册的批处理优化部分。//public const int created=1;/////批处理对象已完全指定,现在正在等待作业完成处理请求。///请参阅批处理操作有关详细信息,请参阅手册的“优化”部分。//public const int SUBMITTED=2;/////用户中止了批处理。///有关详细信息,请参阅手册的“批处理优化”部分。//public const int aborted=3;/////批处理失败。///请参阅批处理优化部分有关详细信息,请参阅手册的章节。//public const int FAILED=4;/////批处理作业已成功处理批处理请求。///有关详细信息,请参阅手册的批处理优化部分。//public const int COMPLETED=5;}//版本号/////Major number///summary>public const int Version\u Major=9;///summary>///Minor number///summary>public const int Version\u Minor=1;///summary>///Technical number///summary>public const int Version\u Technical=2;///Basis status info/////变量为基本变量。///summary>public const int BASIC=0;/////变量在下界为非基本变量。//public const int NONBARIC\u lower=-1;/////变量在上界为非基本变量。//public const int NONBARIC\u lower=-2;//变量为超基本变量。//public const int superbasic=-3;///约束senses public const char LESS_EQUAL='<';public const char GREATER_EQUAL='>';public const char EQUAL='=''=';变量类型public const char CONTINUOUS='C';public const char BINARY='B';public const char INTEGER='I';public const char semint='S';public const char semint='N';//客观意义上的public const int MINIMIZE=1;public const int MAXIMIZE=-1;//SOS类型public const int SOS_TYPE1=1;public const int SOS_TYPE2=2;//一般约束类型public const int GENCONSTR_MAX=0;public const int GENCONSTR_MIN=1;public const int GENCONSTR_ABS=2;public const int GENCONSTR_AND=3;public const int GENCONSTR_OR=4;public const int GENCONSTR INDICATOR=5;公共常数int GENCONSTR\u PWL=6;公共常数int GENCONSTR\u POLY=7;公共常数int GENCONSTR\u EXP=8;公共常数int GENCONSTR\u EXPA=9;公共常数int GENCONSTR_LOG = 10; public const int GENCONSTR_LOGA = 11; public const int GENCONSTR_POW = 12; public const int GENCONSTR_SIN = 13; public const int GENCONSTR_COS = 14; public const int GENCONSTR_TAN = 15; // Numeric constants public const double INFINITY = 1e100; public const double UNDEFINED = 1e101; public const int MAXINT = 2000000000; // Other constants public const int DEFAULT_CS_PORT = 61000; // Limits public const int MAX_STRLEN = 512; public const int MAX_NAMELEN = 255; public const int MAX_TAGLEN = 10240; public const int MAX_CONCURRENT = 64; // Callback constants ///  /// Gurobi callback codes. ///  public class Callback { ///  /// Periodic polling callback. ///  public const int POLLING = 0; ///  /// Currently performing presolve. ///  public const int PRESOLVE = 1; ///  /// Currently in simplex. ///  public const int SIMPLEX = 2; ///  /// Currently in MIP. ///  public const int MIP = 3; ///  /// Found a new MIP incumbent. ///  public const int MIPSOL = 4; ///  /// Currently exploring a MIP node. ///  public const int MIPNODE = 5; ///  /// Currently in barrier. ///  public const int BARRIER = 7; ///  /// Printing a log message. ///  public const int MESSAGE = 6; ///  /// Currently in multi-objective optimization. ///  public const int MULTIOBJ = 8; ///  /// Returns the number of columns removed by presolve to this point. ///  public const int PRE_COLDEL = 1000; ///  /// Returns the number of rows removed by presolve to this point. ///  public const int PRE_ROWDEL = 1001; ///  /// Returns the number of constraint senses changed by presolve to this /// point. ///  public const int PRE_SENCHG = 1002; ///  /// Returns the number of bounds changed by presolve to this point. ///  public const int PRE_BNDCHG = 1003; ///  /// Returns the number of coefficients changed by presolve to this point. ///  public const int PRE_COECHG = 1004; ///  /// Returns the current simplex iteration count. ///  public const int SPX_ITRCNT = 2000; ///  /// Returns the current simplex objective value. ///  public const int SPX_OBJVAL = 2001; ///  /// Returns the current simplex primal infeasibility. ///  public const int SPX_PRIMINF = 2002; ///  /// Returns the current simplex dual infeasibility. ///  public const int SPX_DUALINF = 2003; ///  /// Returns 1 if the model has been perturbed. ///  public const int SPX_ISPERT = 2004; ///  /// Returns the current best objective value. ///  public const int MIP_OBJBST = 3000; ///  /// Returns the current best objective bound. ///  public const int MIP_OBJBND = 3001; ///  /// Returns the current explored node count. ///  public const int MIP_NODCNT = 3002; ///  /// Returns the current solution count. ///  public const int MIP_SOLCNT = 3003; ///  /// Returns the current cutting plane count. ///  public const int MIP_CUTCNT = 3004; ///  /// Returns the current unexplored node count. ///  public const int MIP_NODLFT = 3005; ///  /// Returns the current simplex iteration count. ///  public const int MIP_ITRCNT = 3006; ///  /// Returns the new solution. ///  public const int MIPSOL_SOL = 4001; ///  /// Returns the objective value for the new solution. ///  public const int MIPSOL_OBJ = 4002; ///  /// Returns the current best objective value. ///  public const int MIPSOL_OBJBST = 4003; ///  /// Returns the current best objective bound. ///  public const int MIPSOL_OBJBND = 4004; ///  /// Returns the current explored node count. ///  public const int MIPSOL_NODCNT = 4005; ///  /// Returns the current solution count. ///  public const int MIPSOL_SOLCNT = 4006; ///  /// Returns the status of the current node relaxation. ///  public const int MIPNODE_STATUS = 5001; ///  /// Returns the current node relaxation solution or ray. ///  public const int MIPNODE_REL = 5002; ///  /// Returns the current best objective value. ///  public const int MIPNODE_OBJBST = 5003; ///  /// Returns the current best objective bound. ///  public const int MIPNODE_OBJBND = 5004; ///  /// Returns the current explored node count. ///  public const int MIPNODE_NODCNT = 5005; ///  /// Returns the current solution count. ///  public const int MIPNODE_SOLCNT = 5006; ///  /// Returns the branching variable for the current node. ///  public const int MIPNODE_BRVAR = 5007; ///  /// Returns the current barrier iteration count. ///  public const int BARRIER_ITRCNT = 7001; ///  /// Returns the current barrier primal objective value. ///  public const int BARRIER_PRIMOBJ = 7002; ///  /// Returns the current barrier dual objective value. ///  public const int BARRIER_DUALOBJ = 7003; ///  /// Returns the current barrier primal infeasibility. ///  public const int BARRIER_PRIMINF = 7004; ///  /// Returns the current barrier dual infeasibility. ///  public const int BARRIER_DUALINF = 7005; ///  /// Returns the current barrier complementarity violation. ///  public const int BARRIER_COMPL = 7006; ///  /// Returns the message that is being printed. ///  public const int MSG_STRING = 6001; ///  /// Returns the elapsed solver runtime (in seconds). ///  public const int RUNTIME = 6002; ///  /// Returns the current objective count already optimized. ///  public const int MULTIOBJ_OBJCNT = 8001; ///  /// Returns the current solution count. ///  public const int MULTIOBJ_SOLCNT = 8002; ///  /// Returns the new solution. ///  public const int MULTIOBJ_SOL = 8003; } // Errors ///  /// Gurobi error codes. ///  public class Error { ///  /// Available memory was exhausted. ///  public const int OUT_OF_MEMORY = 10001; ///  /// NULL input value provided for a required argument. ///  public const int NULL_ARGUMENT = 10002; ///  /// Invalid input value. ///  public const int INVALID_ARGUMENT = 10003; ///  /// Tried to query or set an unknown attribute. ///  public const int UNKNOWN_ATTRIBUTE = 10004; ///  /// Tried to query or set an attribute that could not be accessed. ///  public const int DATA_NOT_AVAILABLE = 10005; ///  /// Index for attribute query was out of range. ///  public const int INDEX_OUT_OF_RANGE = 10006; ///  /// Tried to query or set an unknown parameter. ///  public const int UNKNOWN_PARAMETER = 10007; ///  /// Tried to set a parameter to a value that is outside its valid range. ///  public const int VALUE_OUT_OF_RANGE = 10008; ///  /// Failed to obtain a Gurobi license. ///  public const int NO_LICENSE = 10009; ///  /// Attempted to solve a model that is larger than the limit for a /// trial license. ///  public const int SIZE_LIMIT_EXCEEDED = 10010; ///  /// Problem in callback. ///  public const int CALLBACK = 10011; ///  /// Failed to read the requested file. ///  public const int FILE_READ = 10012; ///  /// Failed to write the requested file. ///  public const int FILE_WRITE = 10013; ///  /// Numerical error during requested operation. ///  public const int NUMERIC = 10014; ///  /// Attempted to perform infeasibility analysis on a feasible model. ///  public const int IIS_NOT_INFEASIBLE = 10015; ///  /// Requested operation not valid for a MIP model. ///  public const int NOT_FOR_MIP = 10016; ///  /// Tried to access a model while optimization was in progress. ///  public const int OPTIMIZATION_IN_PROGRESS = 10017; ///  /// Constraint, variable, or SOS contained duplicate indices. ///  public const int DUPLICATES = 10018; ///  /// Error in reading or writing a MIP node file. ///  public const int NODEFILE = 10019; ///  /// non-PSD Q matrix in the objective or in a quadratic constraint. ///  public const int Q_NOT_PSD = 10020; ///  /// Equality quadratic constraints. ///  public const int QCP_EQUALITY_CONSTRAINT = 10021; ///  /// Network error. ///  public const int NETWORK = 10022; ///  /// Job rejected from Compute Server queue. ///  public const int JOB_REJECTED = 10023; ///  /// Operation is not supported in the current usage environment. ///  public const int NOT_SUPPORTED = 10024; ///  /// Result is larger than return value allows. ///  public const int EXCEED_2B_NONZEROS = 10025; ///  /// Problem with piecewise-linear objective function. ///  public const int INVALID_PIECEWIE_OBJ = 10026; ///  /// Not allowed to change UpdateMode parameter once model /// has been created. ///  public const int UPDATEMODE_CHANGE = 10027; ///  /// Problem launching Instant Cloud job. ///  public const int CLOUD = 10028; ///  /// An error occurred during model modification or update. ///  public const int MODEL_MODIFICATION = 10029; ///  /// An error occured with the client-server application. ///  public const int CSWORKER = 10030; ///  /// Multi-model tuning invoked on models of different types. ///  public const int TUNE_MODEL_TYPES = 10031; ///  /// Multi-model tuning invoked on models of different types. ///  public const int SECURITY = 10032; ///  /// Tried to access a constraint or variable that is not in the model. ///  public const int NOT_IN_MODEL = 20001; ///  /// Failed to create the requested model. ///  public const int FAILED_TO_CREATE_MODEL = 20002; ///  /// Internal Gurobi error. ///  public const int INTERNAL = 20003; } ///  /// Constant for Method parameter - /// choose method automatically. ///  public const int METHOD_AUTO = -1; ///  /// Constant for Method and NodeMethod parameters - /// use primal simplex. ///  public const int METHOD_PRIMAL = 0; ///  /// Constant for Method and NodeMethod parameters - /// use dual simplex. ///  public const int METHOD_DUAL = 1; ///  /// Constant for Method and NodeMethod parameters - /// use barrier. ///  public const int METHOD_BARRIER = 2; ///  /// Constant for Method parameters - use concurrent optimizer. ///  public const int METHOD_CONCURRENT = 3; ///  /// Constant for Method parameter - use deterministic concurrent optimizer. ///  public const int METHOD_DETERMINISTIC_CONCURRENT = 4; ///  /// minimize linearly weighted sum of penalties for feasrelax model. ///  public const int FEASRELAX_LINEAR = 0; ///  /// minimize quadratically weighted sum of penalties for feasrelax model. ///  public const int FEASRELAX_QUADRATIC = 1; ///  /// minimize weighted cardinality of relaxations for feasrelax model. ///  public const int FEASRELAX_CARDINALITY = 2;