Decision Optimization

Decision Optimization

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

 View Only
  • 1.  java.lang.RuntimeException: internal error

    Posted Thu August 15, 2013 07:51 AM

    Originally posted by: PriteeAgrawal


    Hi all,

    I use OPL Java API for solving MILP problems. I am solving dantzig wolfe problem and get the below error for the master problem but could not understand what the below error means. 

    java.lang.RuntimeException: internal error (Please notify IBM)

    at ilog.concert.cppimpl.concert_wrapJNI.operator_prod__SWIG_9(Native Method)
    at ilog.concert.cppimpl.concert_wrap.operator_prod(concert_wrap.java:247)
    at ilog.concert.IloModelerAdvImpl.prod(IloModelerAdvImpl.java:809)
    at Main.solveMaster(Main.java:762)
    at Main.solveDW(Main.java:815)
    at Main.main(Main.java:888)

    Please find attached my code for the program where the error comes for the solveMaster method.

    public MasterVal solveMaster(int[] resAvail, ArrayList <RetVal> sol )throws Exception {

    }

     

    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: java.lang.RuntimeException: internal error

    Posted Thu August 15, 2013 09:39 AM

    When I use cplex.jar instead of oplall.jar then I get this backtrace:

    java.lang.NullPointerException
            at ilog.cplex.CpxQTermExtractor.visitMult(CpxQextractor.java:247)
            at ilog.cplex.CpxMult.accept(CpxMult.java:23)
            at ilog.cplex.CpxQextractor.visitMult(CpxQextractor.java:102)
            at ilog.cplex.CpxMult.accept(CpxMult.java:23)
            at ilog.cplex.CpxQextractor.visitLinkedExpr(CpxQextractor.java:77)
            at ilog.cplex.CpxLinkedExpr.accept(CpxLinkedExpr.java:46)
            at ilog.cplex.CpxRange.<init>(CpxRange.java:1337)
            at ilog.cplex.IloCplexModeler.addRange(IloCplexModeler.java:4327)
            at ilog.cplex.IloCplexModeler.addLe(IloCplexModeler.java:4690)
            at Main.solveMaster(Main.java:766)
            at Main.solveDW(Main.java:811)
            at Main.main(Main.java:884)

    This happens because u[index] used in Main.java:765 is null. Using null arguments in IloCplex.prod() is not supported and will result in an exception or crash sooner or later. You should make sure that you don't pass null pointers here.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: java.lang.RuntimeException: internal error

    Posted Thu August 15, 2013 11:58 PM

    Originally posted by: PriteeAgrawal


    Thanks  Daniel,

    I got my mistake that I had not initialized my U[index]. It was so stupid of me. 


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: java.lang.RuntimeException: internal error

    Posted Fri August 16, 2013 05:22 AM

    Originally posted by: PriteeAgrawal


    Hi,

    In my same program for Dantzig wolfe, I have binary variable delta(0,1) and hence this problem is a MIP. I am trying to fetch dual variables for my constraints in solveMaster method but i get CPLEX error 1017: Not available for mixed-integer programs.

    public MasterVal solveMaster(int[] resAvail, ArrayList <TotalRetVal> sol )throws Exception {

    }

    I also tried cplex.solveFixed() method inside my cplex.solve() to get dual values for MIP but still it doesn't work. Please advice on how can I fetch dual values for these constraints in MIP. I am attaching the java file "Main_copy_CC_combined.java" for your reference.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: java.lang.RuntimeException: internal error

    Posted Wed August 21, 2013 05:15 AM

    Originally posted by: TobiasAchterberg


    It is clear that you cannot get duals for a MIP solution, because integer programs do not have a (reasonably simple) dual.

    But the solveFixed() should, after having called solve(), temporarily turn the MIP into an LP by fixing the integer variables to their solution values. Then, getDual() should work. At which point in your source code do you get the exception when you enable the solveFixed() call?


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: java.lang.RuntimeException: internal error

    Posted Thu August 22, 2013 04:29 AM

    With solveFixed() enabled, do you still get error 1017 or do you get some other error?


    #CPLEXOptimizers
    #DecisionOptimization