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