Skip to content

Commit

Permalink
Remove gurobi for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ngreifer committed Dec 22, 2024
1 parent b5a0a10 commit ab8df5b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Suggests:
randomForest (>= 4.7-1),
glmnet (>= 4.0),
gbm (>= 2.1.7),
gurobi,
cobalt (>= 4.2.3),
boot,
marginaleffects (>= 0.19.0),
Expand Down
16 changes: 8 additions & 8 deletions R/matchit2cardinality.R
Original file line number Diff line number Diff line change
Expand Up @@ -719,14 +719,14 @@ dispatch_optimizer <- function(solver = "highs", obj, mat, dir, rhs, types, max
# bounds = list(lower = lb, upper = ub), #Spurious warning when using bounds
time_limit = time)
}
else if (solver == "gurobi") {
dir[dir == "<="] <- "<"
dir[dir == ">="] <- ">"
dir[dir == "=="] <- "="
opt.out <- gurobi::gurobi(list(A = mat, obj = obj, sense = dir, rhs = rhs, vtype = types,
modelsense = "max", lb = lb, ub = ub),
params = list(OutputFlag = as.integer(verbose), TimeLimit = time))
}
# else if (solver == "gurobi") {
# dir[dir == "<="] <- "<"
# dir[dir == ">="] <- ">"
# dir[dir == "=="] <- "="
# opt.out <- gurobi::gurobi(list(A = mat, obj = obj, sense = dir, rhs = rhs, vtype = types,
# modelsense = "max", lb = lb, ub = ub),
# params = list(OutputFlag = as.integer(verbose), TimeLimit = time))
# }
else if (solver == "highs") {
rhs_h <- lhs_h <- rhs

Expand Down

0 comments on commit ab8df5b

Please sign in to comment.