Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

The referenced IloExtractable has not been extracted by the IloAlgorithm

  • 1.  The referenced IloExtractable has not been extracted by the IloAlgorithm

    Posted Wed August 28, 2013 03:42 AM

    Originally posted by: JorgeGarcíaCastillo


    Hello,

    I'm working with the version of CP Optimizer that comes with CPLEX Studio 12.4. I found a problem that I've been able to reproduce in a tiny trivial model.

    The exception stacktrace is the following :

    ilog.concert.IloException: The referenced IloExtractable has not been extracted by the IloAlgorithm
    at ilog.cp.cppimpl.cp_wrapJNI.IloCP_startNewSearch__SWIG_2(Native Method)
    at ilog.cp.cppimpl.IloCP.startNewSearch(IloCP.java:161)
    at ilog.cp.IloCP.startNewSearch(IloCP.java:2296)

     

    I attach the following code snippet where the problem occurs:

    public class CPProblem {
     
    public static void main(String[] args) {
    IloCP cpo = new IloCP();
    int[][] matrix = { { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 }, { 1 }, { 1 } };
    List<Integer> listOfInts = new ArrayList<Integer>();
    listOfInts.add(1);
    listOfInts.add(0);
     
    try {
     
    int[] values = new int[listOfInts.size()];
    int cont = 0;
     
    for (Integer i : listOfInts) {
    values[cont++] = i;
    }
     
    // Vars
    IloIntVar[] x = new IloIntVar[7];
    for (int d = 0; d < x.length; d++) {
    String name = "X" + Integer.toString(d);
    x[d] = cpo.intVar(values, name);
    }
     
    // Constraints
    for (int i = 0; i < 7; i++) {
    IloConstraint ct = cpo.member(x[i], matrix[i]);
    cpo.add(ct);
    }
     
    cpo.setParameter(IloCP.IntParam.SearchType, IloCP.ParameterValues.DepthFirst);
    cpo.setParameter(IloCP.IntParam.LogVerbosity, IloCP.ParameterValues.Verbose);
    cpo.setParameter(IloCP.IntParam.Workers, 1);
     
    // Search
    IloSearchPhase sp = cpo.searchPhase(x);
    cpo.startNewSearch(sp);
    while (cpo.next()) {
    processSolution(cpo);
     
    }
    } catch (Exception e) {
    e.printStackTrace();
    } finally {
    if (cpo != null) {
    cpo.end();
    }
    }
    }
     
    public static void processSolution(IloCP cpo) {
    System.out.println("Solution found");
    }
     
    }
     

     

    This problem reproduces in a bigger instance of a complex model and there is no possibility to change CP version to a more recent one. Where does it come from and how can I solve it??

    Note : I noticed that modifing very little the model the exception dissapears. For example, adding one more element to the listOfInts (listOfInts.add(6)) and one more number to the matrix ( matrix = {{0,1,6},{1,0},{1,0}{1,0}{1,0},{1},{1}}).

     

    Thanks a lot.

     

    Jorge Garcia

     


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: The referenced IloExtractable has not been extracted by the IloAlgorithm

    Posted Wed August 28, 2013 10:31 AM

    Originally posted by: ol


    Hello,

    I have reproduced the problem in version 12.4, but cannot reproduce it in more recent versions. I recommend an upgrade to version 12.5.1 which fixes and improves many things.

    Regards,

    Olivier

     


    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: The referenced IloExtractable has not been extracted by the IloAlgorithm

    Posted Thu September 05, 2013 07:22 AM

    Originally posted by: JorgeGarcíaCastillo


    12.5.1 version solved it.

    Thanks!

     

    Jorge


    #CPOptimizer
    #DecisionOptimization