Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  How to set WorkDir parameter in cplex c++ concert technology?

    Posted 04/27/16 11:59 PM

    Originally posted by: jiaodaxiaozi


    Hi everyone,

    I tried to set WorkDir parameter in cplex c++ concert technology, but I turned out my setting did not work and no errors were reported, the syntax I wrote is:

    cplex.setParam(IloCplex::StringParam::WorkDir, "C:\\A");

    The path "C:\\A" is right, I would be appreciate If you can tell me why. Thanks a lot.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: How to set WorkDir parameter in cplex c++ concert technology?

    Posted 04/28/16 01:36 AM

    Does this even compile? Shouldn't it be just IloCplex::WorkDir?

    How did you conclude that it did not work?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: How to set WorkDir parameter in cplex c++ concert technology?

    Posted 04/28/16 02:10 AM

    Originally posted by: jiaodaxiaozi


    Hi Daniel,

    I conclude it did not work by the following sentences:

    IloCplex cplex(env);
    cplex.setParam(IloCplex::WorkDir, "C:\\A"); 
    cplex.setParam(IloCplex::MIPDisplay, 3); 
    cplex.setParam(IloCplex::StringParam::IntSolFilePrefix, "./newtest"); 
    cplex.extract(model); 
    cplex.solve();
    

    I expected to find solution files at "C:\\A" after setting WorkDir to "C:\\A". I have tried your recommended method and I still can't find solution files. I guess maybe because I used the wrong methods to test WorkDir parameter.

    Thanks.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: How to set WorkDir parameter in cplex c++ concert technology?

    Posted 04/28/16 03:33 AM

    Parameter WorkDir does not apply to the files created via IntSolFilePrefix. Try setting the IntSolFilePrefix to "C:\\A\newtest".


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: How to set WorkDir parameter in cplex c++ concert technology?

    Posted 04/28/16 02:17 AM

    Originally posted by: jiaodaxiaozi


    Hi Daniel,

    I want to change the default cplex WorkDir parameter because after have running cplex for about 69131 seconds, my cplex reported the error message " Exception Caught: CPLEX error 1803: Failure on temporary file write ". I assume that is because my default disk doesn't have enough storage, that's why I want to make some change to WordDir parameter.

    Thanks.


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: How to set WorkDir parameter in cplex c++ concert technology?

    Posted 04/28/16 03:36 AM

    I am not sure this exception can be triggered by files written via IntSolFilePrefix. Do you write other files? In particular, do you have set parameter NodeFileInd to 2 or 3?


    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: How to set WorkDir parameter in cplex c++ concert technology?

    Posted 04/28/16 03:48 AM

    Originally posted by: jiaodaxiaozi


    Hi Daniel,

    I got it, so I change WorkDir parameter successfully and this change doesn't apply to IntSolFilePrefix. The exception was caught without IntSolFilePrefix used in my program. I will try to set NodeFileInd to 2 or 3 and I will tell you whether the exception will come out again. I am very grateful for your kind help.

    Thanks.


    #CPLEXOptimizers
    #DecisionOptimization