You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im testing rmpk using CPLEX on the below example data found on the online vignette:
set.seed(42)
n <- 10
returns <- matrix( rnorm(n * 20,
mean = runif(n, 0.01, 0.03),
sd = runif(n, 0.1, 0.4)),
ncol = n) # 20 time periods
e <- colMeans(returns)
C <- cov(returns)
min_mu <- 0.02
solver <- ROI_optimizer("cplex")
model <- optimization_model(solver)
x <- model$add_variable("x", i = 1:n, lb = 0, ub = 1)
model$set_objective(sum_expr(2 * C[i, j] * x[i] * x[j], i = 1:n, j = 1:n))
model$add_constraint(sum_expr(e[i] * x[i], i = 1:n) >= min_mu)
model$add_constraint(sum_expr(x[i], i = 1:n) == 1)
solver$optimize()
But this does not return a solution. The value columns are NA.
I have also tested that (1) CPLEX is working using the ROI package, and (2) other solvers work for this example problem.
Debugging cplex within rmpk reveals that Q is not a symmetric matrix.
Any ideas?
The text was updated successfully, but these errors were encountered:
Hi @dirkschumacher ,
Im testing rmpk using CPLEX on the below example data found on the online vignette:
But this does not return a solution. The value columns are NA.
I have also tested that (1) CPLEX is working using the ROI package, and (2) other solvers work for this example problem.
Debugging cplex within rmpk reveals that Q is not a symmetric matrix.
Any ideas?
The text was updated successfully, but these errors were encountered: