Originally posted by: Broncho
I coded objective and constraints, no errors any more. Then I will solve the model.
The model solving codes are:
IloCplex cplex(env);
cplex.extract(model);
cplex.solve();
Before these codes, I have
IloEnv env;
IloModel model(env);
No compile errors, but when I run it, an error points at a file malloc.c
void * __cdecl _malloc_base (size_t size)
{
void *res = NULL;
// validate size
if (size <= _HEAP_MAXREQ) {
for (;;) {
// allocate memory block
res = _heap_alloc(size); ////<<<---this is the error line!! The value of " size" us 4008 in the Autos box.
// if successful allocation, return pointer to memory
// if new handling turned off altogether, return NULL
Thus, it seems to be a memory problem. And the problem occurs on line IloCplex cplex(env);.
If it is because of memory, how to solve it? Thanks.
PS: I also have freed the memory for all expression type after I used them, so they cannot occupy any memory.
#CPLEXOptimizers#DecisionOptimization