I tried searching quite a bit but could not find the answer. What is the size of integer variables in CPLEX? Is it 64-bit or is it arbitrary precision based on the bounds?
Asked
Active
Viewed 161 times
0
-
Why not try sizeof(IloInt) ? – Tryer Nov 19 '20 at 06:41
-
@Tryer I work in python and python has arbitrary precision integers. But yeah, I should've looked at the APIs of other languages. That should've cleared it. – Samvid Mistry Nov 20 '20 at 07:56
2 Answers
1
public IloIntVar(IloEnv env, IloInt vmin=0, IloInt vmax=IloIntMax, const char * name=0)
The Max Value of an integer decision variable is IloIntMax
PS:
dvar int x;
subject to
{
}
execute
{
writeln(x.UB);
}
gives the exact value
2147483647

halfer
- 19,824
- 17
- 99
- 186

Alex Fleischer
- 9,276
- 2
- 12
- 15
-
This is not what is asked by the OP. The question is, what would sizeof(IloInt) return? – Tryer Nov 19 '20 at 06:40
0
code in in concert/include/ilconcert/ilosys.h
typedef __int64 IloInt;
typedef unsigned __int64 IloUInt;
typedef long IloInt;
typedef unsigned long IloUInt;
typedef double IloNum;
typedef float IloShortNum;
typedef IloInt IloBool;
typedef void* ILO_MAY_ALIAS IloAny;
typedef IloNum (*IloNumFunction)(IloNum);
IloNum is double
IloBool/IloInt both are long

Dongxu Wang
- 41
- 5