Topic
  • 4 replies
  • Latest Post - ‏2013-07-17T14:58:24Z by Adriano199
Adriano199
Adriano199
5 Posts

Pinned topic Change solving algorithm

‏2013-07-17T10:08:49Z |

Hi,

I'm starting in the world of ILOG and i'm using java to call ILOG and  OPLRunSample java file to import the model and dat file to solve the problem. 

My question is if it's possible to define another algorithm inside of CP optimizer. 

Regards,
Adriano

  • Philippe_Refalo
    Philippe_Refalo
    51 Posts
    ACCEPTED ANSWER

    Re: Change solving algorithm

    ‏2013-07-17T13:37:49Z  

    Your question is pretty unclear so there are several answers:

    - In CP Optimizer, you can choose between DepthFirst, Restart (default) and MultiPoint algorithms to solve the problem. Look at parameter SearchType.

    - If your problem is linear or has a form that is supported by CPLEX then you can use CPLEX instead of CP Optimizer

    - You can include a domain-reduciton algorithm as a subclass of an IloPropagator in Java, however this is rather slow as it goes through a JNI. 

    - You can include a domain-reduction algorithm as a subclass of an IloConstraint in C++  -- this is the way every CP Optimizer constraints is implemented.

    Regards

    Philippe

  • Philippe_Refalo
    Philippe_Refalo
    51 Posts
    ACCEPTED ANSWER

    Re: Change solving algorithm

    ‏2013-07-17T14:20:56Z  

    Thanks for the answer Philippe.

    My intention is to edit model file using java, I mean to multi-agent system to edit the model changing algorithm's. The best way to edit the model file is using a parser I thing am I correct?  The model is already built.

     

    Regards,

    Adriano

     

    You can parse and edit the OPL model but if you change only the configuration of CP Optimizer you can use parameter changes. If you plan to do significant changes in the mdel it might be better to create it in Java, it will be easier to edit afterwards in the agents. 

    Philippe

  • Philippe_Refalo
    Philippe_Refalo
    51 Posts

    Re: Change solving algorithm

    ‏2013-07-17T13:37:49Z  

    Your question is pretty unclear so there are several answers:

    - In CP Optimizer, you can choose between DepthFirst, Restart (default) and MultiPoint algorithms to solve the problem. Look at parameter SearchType.

    - If your problem is linear or has a form that is supported by CPLEX then you can use CPLEX instead of CP Optimizer

    - You can include a domain-reduciton algorithm as a subclass of an IloPropagator in Java, however this is rather slow as it goes through a JNI. 

    - You can include a domain-reduction algorithm as a subclass of an IloConstraint in C++  -- this is the way every CP Optimizer constraints is implemented.

    Regards

    Philippe

  • Adriano199
    Adriano199
    5 Posts

    Re: Change solving algorithm

    ‏2013-07-17T13:58:27Z  

    Your question is pretty unclear so there are several answers:

    - In CP Optimizer, you can choose between DepthFirst, Restart (default) and MultiPoint algorithms to solve the problem. Look at parameter SearchType.

    - If your problem is linear or has a form that is supported by CPLEX then you can use CPLEX instead of CP Optimizer

    - You can include a domain-reduciton algorithm as a subclass of an IloPropagator in Java, however this is rather slow as it goes through a JNI. 

    - You can include a domain-reduction algorithm as a subclass of an IloConstraint in C++  -- this is the way every CP Optimizer constraints is implemented.

    Regards

    Philippe

    Thanks for the answer Philippe.

    My intention is to edit model file using java, I mean to multi-agent system to edit the model changing algorithm's. The best way to edit the model file is using a parser I thing am I correct?  The model is already built.

     

    Regards,

    Adriano

     

  • Philippe_Refalo
    Philippe_Refalo
    51 Posts

    Re: Change solving algorithm

    ‏2013-07-17T14:20:56Z  

    Thanks for the answer Philippe.

    My intention is to edit model file using java, I mean to multi-agent system to edit the model changing algorithm's. The best way to edit the model file is using a parser I thing am I correct?  The model is already built.

     

    Regards,

    Adriano

     

    You can parse and edit the OPL model but if you change only the configuration of CP Optimizer you can use parameter changes. If you plan to do significant changes in the mdel it might be better to create it in Java, it will be easier to edit afterwards in the agents. 

    Philippe

  • Adriano199
    Adriano199
    5 Posts

    Re: Change solving algorithm

    ‏2013-07-17T14:58:24Z  

    You can parse and edit the OPL model but if you change only the configuration of CP Optimizer you can use parameter changes. If you plan to do significant changes in the mdel it might be better to create it in Java, it will be easier to edit afterwards in the agents. 

    Philippe

    Thanks for your help Philippe.