Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
3 replies Latest Post - ‏2014-03-26T10:39:02Z by Philippe_Refalo
Trust20092009_01
Trust20092009_01
6 Posts
ACCEPTED ANSWER

Pinned topic Add non reversibles constraints during search

‏2014-03-25T19:41:57Z |

Hello, 

I read this sentence in the cp manual  " Posting a constraint is reversible: the constraint is removed when CP Optimizer backtracks to choice points set before that constraint was posted. "

I want to post some constraints during search but iwant them to be valid throughout the search procedure.  Is there any way to do this?

Best,

S.S

 

 

  • Philippe_Refalo
    Philippe_Refalo
    48 Posts
    ACCEPTED ANSWER

    Re: Add non reversibles constraints during search

    ‏2014-03-26T09:13:33Z  in response to Trust20092009_01

    You cannot to this with regular constraints. You will have to end the search, add the constraint and start the search again. 

    You can do this by designing your own constraint but you need to be careful about problems that can be caused by the discrepancies that may appear between possible constraint data that will be backtracked (in addition to the domains) and the persistent data. Both must match at any time. 

    Try restarting before going into this tedious custom constraints design. With a new constraint at the top of the search, CP Optimizer will do better choices and can converge faster.

    Regards

    Philippe

  • Philippe_Refalo
    Philippe_Refalo
    48 Posts
    ACCEPTED ANSWER

    Re: Add non reversibles constraints during search

    ‏2014-03-26T09:17:13Z  in response to Trust20092009_01

    You cannot to this with regular constraints. You will have to end the search, add the constraint and start the search again. 

    You can do this by designing your own constraint but you need to be careful about problems that can be caused by the discrepancies that may appear between possible constraint data that will be backtracked (in addition to the domains) and the persistent data. Both must match at any time. 

    Try restarting before going into this custom constraints design. With a new constraint at the top of the search, CP Optimizer will do better choices and can converge faster.

    Regards

    Philippe

  • Philippe_Refalo
    Philippe_Refalo
    48 Posts
    ACCEPTED ANSWER

    Re: Add non reversibles constraints during search

    ‏2014-03-26T10:39:02Z  in response to Trust20092009_01

    You cannot to this with regular constraints. You will have to end the search, add the constraint and start the search again. 

    You can do this by designing your own constraint but you need to be careful about problems that can be caused by the discrepancies that may appear between possible constraint data that will be backtracked (in addition to the domains) and the persistent data. Both must match at any time. 

    Try restarting before going into this custom constraints design. With a new constraint at the top of the search, CP Optimizer will do better choices and can converge faster.

    Regards

    Philippe