Topic
3 replies Latest Post - ‏2013-10-03T15:11:13Z by ChrisBr
emiliomartin
emiliomartin
2 Posts
ACCEPTED ANSWER

Pinned topic How detect infeasibilities from a tentative solution

‏2013-09-26T08:08:37Z |
Hi,
 
We are working on a scheduling project which requires detect errors or infeasibilities from a given tentative solution. A user can generate a solution and our system has to check if the provided solution is valid or not. In the latter case our application must specifies all detected infeasibilities. 
 
We've already used Conflict Refiner, but is not enough due to it detects the minimal conflict set, and we need the whole set. Moreover the way that CP provides the detected errors is difficult to handle (is given in a text string). 
 
Other doubt is the following. During search phase, and using our custom goal,  if a fail is thrown we would like to know which constraint is responsible of that fail.

Thanks for your time. 

Regards. 

  • ChrisBr
    ChrisBr
    57 Posts
    ACCEPTED ANSWER

    Re: How detect infeasibilities from a tentative solution

    ‏2013-10-01T16:19:53Z  in response to emiliomartin

    Hello Emilio,

    Sorry for the late answer.

    I suggest that you have a look at the sample
            <Install_dir>/cpoptimizer/examples/src/cpp/sched_conflict.cpp
    especially the Scenario 4.

    I hope this helps,

    Chris.
     

    • emiliomartin
      emiliomartin
      2 Posts
      ACCEPTED ANSWER

      Re: How detect infeasibilities from a tentative solution

      ‏2013-10-01T19:06:37Z  in response to ChrisBr

       

      Hi Chris,
       
      Many thanks for your answer. The scenario 4 is just what we're looking for... I put the scenario's description below for other users:
       
      " Scenario 4: Find a minimal conflict partition that is, a set of disjoint  minimal conflicts S1,...,Sn such that when all constraints in S1 U S2 U... U Sn are removed from the model, the model becomes feasible.
       
      After having a look on it I have a new question.
       
      There is any way to recover the same information printed by the method cp.writeConflict(cp. out()).?
       
      I mean, we can know if a constraint belongs to the current set of conflicts, using method cp. getConflict(constrain[i]). However, as far as we know there is no way to know which variable/s (IloIntervalVar) is related to which constraint, unless we use an external data structure. This information is critical for us in order to compose human-readable messages for users.  
       
      Should we construct a parser to translate information provided  by cp.writeConflict(...) into human-readable messages? Or there exist other way to compose these messages? 

      Kind Regards.

      Updated on 2013-10-01T19:17:44Z at 2013-10-01T19:17:44Z by emiliomartin
      • ChrisBr
        ChrisBr
        57 Posts
        ACCEPTED ANSWER

        Re: How detect infeasibilities from a tentative solution

        ‏2013-10-03T15:11:13Z  in response to emiliomartin

        Hello Emilio,

        I'm not sure to understand what you want to do.
        I suggest that you try
           cp.getConflict(IloIntervalVar)
        after have set
           cp.setParameter(IloCP::ConflictRefinerOnVariables, IloCP::On)

        A way to know which variables are related to which constraints is to maintain the links yourselves.

        Regards,

        Chris.