Hi,
I'm using cplexcp with JuMP. I'm able to add variables, constraints and objective. However when I try to optimize, it failed.
model=JuMP.Model(CPLEXCP.Optimizer)
var=[@variable(model,binary=true) for _ in 1:100]
con=@constraint(model,sum(var)<=50)
@objective(model,Min,sum(var.*rand(100)))
optimize!(model)
Exception in thread "main" java.lang.ClassCastException: class [Lilog.concert.IloNumVar; cannot be cast to class [Lilog.concert.IloIntVar; ([Lilog.concert.IloNumVar; and [Lilog.concert.IloIntVar; are in unnamed module of loader 'app')
at ilog.concert.IloModelerImpl.scalProd(IloModelerImpl.java:488)
at ilog.concert.IloModelerImpl.scalProd(IloModelerImpl.java:467)
ERROR: JavaCall.JavaCallError("Error calling Java: java.lang.ClassCastException: class [Lilog.concert.IloNumVar; cannot be cast to class [Lilog.concert.IloIntVar; ([Lilog.concert.IloNumVar; and [Lilog.concert.IloIntVar; are in unnamed module of loader 'app')")
Hi, I'm using cplexcp with JuMP. I'm able to add variables, constraints and objective. However when I try to optimize, it failed.
Exception in thread "main" java.lang.ClassCastException: class [Lilog.concert.IloNumVar; cannot be cast to class [Lilog.concert.IloIntVar; ([Lilog.concert.IloNumVar; and [Lilog.concert.IloIntVar; are in unnamed module of loader 'app') at ilog.concert.IloModelerImpl.scalProd(IloModelerImpl.java:488) at ilog.concert.IloModelerImpl.scalProd(IloModelerImpl.java:467) ERROR: JavaCall.JavaCallError("Error calling Java: java.lang.ClassCastException: class [Lilog.concert.IloNumVar; cannot be cast to class [Lilog.concert.IloIntVar; ([Lilog.concert.IloNumVar; and [Lilog.concert.IloIntVar; are in unnamed module of loader 'app')")