Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  example using feaopt - JAVA

    Posted 08/02/12 09:53 AM

    Originally posted by: CplexUser1453


    Hello

    I have not managed to find a code example using the feasOpt method. Is there one available somewhere?

    I am trying to use it but I am getting a bad cast exception :
    java.lang.RuntimeException: internal error: bad cast
            at ilog.concert.cppimpl.IloConcertUtils.ToCppIloRange(IloConcertUtils.java:281)
            at ilog.concert.cppimpl.IloConcertUtils.ToCppIloRangeArray(IloConcertUtils.java:362)
            at ilog.concert.cppimpl.IloConcertUtils.ToCppIloRangeArray(IloConcertUtils.java:388)
            at ilog.cplex.IloCplex.feasOpt(IloCplex.java:9053)
            at ilog.cplex.IloCplex.feasOpt(IloCplex.java:9192)
    


    when using passing an IloRange [] (.getClass() gives me "class [Lilog.concert.IloNumVar")

    and

    java.lang.RuntimeException: internal error: bad cast
            at ilog.concert.cppimpl.IloConcertUtils.ToCppIloNumVar(IloConcertUtils.java:147)
            at ilog.concert.cppimpl.IloConcertUtils.ToCppIloNumVarArray(IloConcertUtils.java:324)
            at ilog.concert.cppimpl.IloConcertUtils.ToCppIloNumVarArray(IloConcertUtils.java:331)
            at ilog.cplex.IloCplex.feasOpt(IloCplex.java:9060)
            at ilog.cplex.IloCplex.feasOpt(IloCplex.java:9135)
    

    when passing a IloNumVar [] as an argument (.getClass() gives me "class [Lilog.concert.IloRange")

    Would be very grateful for any hint on what I am doing wrong...
    Thx
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: example using feaopt - JAVA

    Posted 08/02/12 10:16 AM

    Originally posted by: CplexUser1453


    OK, sorry for my stupid question. My IloNumVar array and IloRange array was only partially filled due to an index bug :(
    #CPLEXOptimizers
    #DecisionOptimization