Menu

Explanation and choco3

Help
meriam
2014-10-21
2014-10-27
  • meriam

    meriam - 2014-10-21

    Hi,
    How to use explanation in choco3 to know why a problem has no solution?
    Thanks

     
  • Charles Prud'homme

    Hi,

    You'll find the instructions in the user guide tagged 3.2.1, p49-52.
    But keep in mind that the explained propagators are, for the moment, limited to unary, binary and ternary ones. Moreover, explaining that a problem has no solution required to plug explanation in AND a complete search process. Thus, the resolution can take time.

    The work on explanations is still in progress.

    Hope it helps,
    CP

    NB: please, go to https://github.com/chocoteam/choco3 to post questions relative to choco3.

     
  • meriam

    meriam - 2014-10-22

    Thank you for your help
    I have tried this code:
    solver.set(new RecorderExplanationEngine(solver));
    ConflictBasedBackjumping cbj = new ConflictBasedBackjumping(solver.getExplainer());
    // Then active end-user explanation
    cbj.activeUserExplanation(true);
    if(!solver.findSolution()){
    // If the problem has no solution, the end-user explanation can be retrieved
    System.out.println(cbj.getUserExplanation());
    }

    But, I had this message activeUserExplanation and getUserExplanation are not defined for ConflictBasedBackjumping

     
  • Charles Prud'homme

    Yep, as explained, you need to set the property PROP_IN_EXP to true.

    To do so, if you work with the sources, simply modify the configuration.properties in choco3/choco-solver/src/main/resources/.
    If you work with the jar file, create a file named user.properties and simply add the following property: PROP_IN_EXP = true. Then move it the root directory of your project.

    Hope it helps,

    CP

     
  • meriam

    meriam - 2014-10-27

    Hi,
    I downloaded this jar: "choco-solver-3.2.0-jar-with-dependencies.jar", I added this jar to my project, I created a file named user.properties and added the following property: PROP_IN_EXP = true.
    However, I had this compilation problem: the method activeUserExplanation(boolean) is not defined for the type ConflictBasedBackjumping.
    Thank you for your help

     
  • Charles Prud'homme

    That's because you downloaded the wrong jar.
    You should dl v3.2.1.
    The jar file has changed, it is now simply choco-solver-3.2.1.jar

    Hope it helps,
    CP
    NB: please, go to https://github.com/chocoteam/choco3 to post questions relative to choco3.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.