Decision Optimization

 View Only
Expand all | Collapse all

Same model and data file but different number of constraints using oplrun and IDE

  • 1.  Same model and data file but different number of constraints using oplrun and IDE

    Posted Tue June 13, 2023 09:35 AM
    Edited by Kristen Park Tue June 13, 2023 10:13 AM

    Hello everyone,

    I'm using CP Optimizer to solve a RCPSP. When I run the configuration in the IDE, the problem is solved instantly. However, when using the oplrun command, it takes a long time.

    I have noticed a difference in the number of constraints: 284 when using oplrun and 504 when using the IDE.

    I have tried using oplrun directly with the .mod and .dat files, as well as using oplrun with the run configuration, but the behavior remains the same.

    Does anyone know why this is happening? Thanks!

    #CPOptimizer #DecisionOptimization #OPLusingCPOptimizer 



    ------------------------------
    Duc Anh LE
    ------------------------------



  • 2.  RE: Same model and data file but different number of constraints using oplrun and IDE

    Posted Tue June 13, 2023 11:49 AM

    Hello Duc Anh,

    This behavior is rather unexpected !

    Do you have multiple installations of COS on your machine ?

    I performed a quick sanity check on my machine with COS 22.1.1, and I confirm that I get exactly the same logs in the IDE or with oplrun, using a sample RCPSP problem.

    One needs to make sure that the same binaries are involved in your case.

    May be there are some issues with environment variables that may explain this behavior.

    I hope this helps.

    Best regards,



    ------------------------------
    Hugues Juille
    ------------------------------



  • 3.  RE: Same model and data file but different number of constraints using oplrun and IDE

    Posted Wed June 14, 2023 04:37 AM
    Edited by Duc Anh LE Wed June 14, 2023 04:38 AM

    Hi Hugues,

    Thanks for your answer.

    Yes, I never thought about that. Effectively, there are many versions of COS on the computer, and the $PATH variable causes this behavior.

    Simply adding "./" before "oplrun" or using the complete path to oplrun of COS 22.1.1 solves this problem.

    Many thanks!



    ------------------------------
    Duc Anh LE
    ------------------------------