Skip to content

Commit

Permalink
Trying to fix bug with problem replication with gurobi
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Henry committed Feb 15, 2025
1 parent 89d8471 commit ee1872c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions modelseedpy/fbapkg/problemreplicationpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@ def build_package(self, parameters):
self.variables[str(count)] = {}
newobj = []
new_var_hash = {}
othermdl.solver = "gurobi"
for var in othermdl.variables:
if var.name not in shared_var_hash:
print("Original variable: " + str(Variable))
newvar = Variable.clone(var)
print("Copy variable: " + str(newvar))
newvar.name = var.name + "." + str(count)
newvar = self.model.problem.Variable(
var.name + "." + str(count), lb=var.lb, ub=var.ub, type=var.type
)
self.variables[str(count)][var.name] = newvar
new_var_hash[var.name] = newvar
newobj.append(newvar)
Expand Down

0 comments on commit ee1872c

Please sign in to comment.