Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  error 1013

    Posted 05/15/18 07:15 AM

    Originally posted by: savant_ning


    }
    }
    model.add(fcon >= 1); // add the generated constraint into the model
    fcon.end(); // reset the constraint expression
    }


    IloCplex cplex(model);
    cplex.setOut(env.getNullStream());

    cplex.setParam(IloCplex::WorkMem,2048.0);
    //cplex.setParam(IloCplex::IntParam::NodeFileInd,3 );
    //cplex.setParam(IloCplex::NodeSel, 3.0);
    //cplex.setParam(IloCplex::VarSel, 3.0);


    if (!cplex.solve()) { // call cplex.solve() to solve the model; when return IloTrue, a feasible solution is found. Otherwise, when return IloFalse, no solution is found
    //printf("Failed to optimize LP.\n");
    return (colNum + 1.0);
    }

    lowerBound = cplex.getObjValue();

    // save the values of xVar's
    for (ii = 0; ii < size_colsInSubMatrix; ii++) {
    xVars[colsInSubMatrix[ii]] = cplex.getValue(xVar[ii]);
    }
    fobj.end();
    }
    catch (IloException&e) {
    std::cerr << "Concert exception caught:" << e << std::endl;

    }
    catch (...) {
    std::cerr << "Unknown exception caught" << std::endl;
    }
    env.end();

    return lowerBound;
    }

     

    and I know my error is :

     

    cplex.setParam(IloCplex::WorkMem,2048.0);
            //cplex.setParam(IloCplex::IntParam::NodeFileInd,3 );
            //cplex.setParam(IloCplex::NodeSel, 3.0);
            //cplex.setParam(IloCplex::VarSel, 3.0);


     

    I don't know why they doesn't work


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: error 1013

    Posted 05/16/18 12:10 PM

    This is very odd. Error 1013 is "invalid parameter number" but of course IloCplex::WorkMem is a valid parameter! Are you  sure the exception comes from the line you indicated? Do you have a small code to reproduce the issue?


    #CPLEXOptimizers
    #DecisionOptimization