Topic
  • 2 replies
  • Latest Post - ‏2014-04-25T14:22:09Z by Trust20092009_01
Trust20092009_01
Trust20092009_01
6 Posts

Pinned topic Reversible data inside IloIntVarChooserI

‏2014-03-22T14:43:48Z |

Hello,

I'm using a reversible array IlcRevBool *covered inside an instance of IlcConstraintI. When a decision variable xi takes the value 1,  all the neighbors off vertex i  will be covered, so covered[ j ] =IlcTrue for j in neighbors i.

To guide my search, i want to use the information guiven by this reversible data inside an instance of IloIntVarChooserI.

I would be very grateful if you can help me.

S.S

Updated on 2014-03-22T14:48:48Z at 2014-03-22T14:48:48Z by Trust20092009_01
  • Philippe_Refalo
    Philippe_Refalo
    48 Posts
    ACCEPTED ANSWER

    Re: Reversible data inside IloIntVarChooserI

    ‏2014-03-26T09:02:03Z  

    Hi, 

    It should not be a problem to use the data maintained inside a constraint for a variable and a value chooser. You can copy the information at the end of propagation in a array that is visible outside the constraints (i.e by the chooser). You can also share a single boolean array. When updating it from inside the constraint you will have to call IloCP::saveValue(...) before changin a boolean value so that it will be backtracked. 

    Regards

    Philippe 

    Updated on 2014-03-26T10:51:57Z at 2014-03-26T10:51:57Z by Philippe_Refalo
  • Trust20092009_01
    Trust20092009_01
    6 Posts
    ACCEPTED ANSWER

    Re: Reversible data inside IloIntVarChooserI

    ‏2014-04-25T14:22:09Z  

    Hi, 

    It should not be a problem to use the data maintained inside a constraint for a variable and a value chooser. You can copy the information at the end of propagation in a array that is visible outside the constraints (i.e by the chooser). You can also share a single boolean array. When updating it from inside the constraint you will have to call IloCP::saveValue(...) before changin a boolean value so that it will be backtracked. 

    Regards

    Philippe 

    Thank you very much Phillipe. I opted for your first option but to avoid paying the cost of the copy at the end of the propagation I just set my IlcRevBool* as static member of my instance of IlcConstraintI and it works perfectly thank you again. 

    Regards

    S.S

  • Philippe_Refalo
    Philippe_Refalo
    48 Posts

    Re: Reversible data inside IloIntVarChooserI

    ‏2014-03-26T09:02:03Z  

    Hi, 

    It should not be a problem to use the data maintained inside a constraint for a variable and a value chooser. You can copy the information at the end of propagation in a array that is visible outside the constraints (i.e by the chooser). You can also share a single boolean array. When updating it from inside the constraint you will have to call IloCP::saveValue(...) before changin a boolean value so that it will be backtracked. 

    Regards

    Philippe 

    Updated on 2014-03-26T10:51:57Z at 2014-03-26T10:51:57Z by Philippe_Refalo
  • Trust20092009_01
    Trust20092009_01
    6 Posts

    Re: Reversible data inside IloIntVarChooserI

    ‏2014-04-25T14:22:09Z  

    Hi, 

    It should not be a problem to use the data maintained inside a constraint for a variable and a value chooser. You can copy the information at the end of propagation in a array that is visible outside the constraints (i.e by the chooser). You can also share a single boolean array. When updating it from inside the constraint you will have to call IloCP::saveValue(...) before changin a boolean value so that it will be backtracked. 

    Regards

    Philippe 

    Thank you very much Phillipe. I opted for your first option but to avoid paying the cost of the copy at the end of the propagation I just set my IlcRevBool* as static member of my instance of IlcConstraintI and it works perfectly thank you again. 

    Regards

    S.S