Open tburandt opened 2 days ago
Hey @tburandt, this is quite weird. linopy does not have a model_builder.solve
, so I am wondering whether this occurs in one of the other libraries highspy
or cplex
.
@FabianHofmann hey, yeah sorry, model_builder.solve is my class and in essence only calls model.solve:
def solve(self, [...]):
attempt = 0
while attempt < self.max_retries:
try:
logging.info(
f"Attempt {attempt + 1}/{self.max_retries} to solve the model."
)
model.solve(**solver_kwargs)
logging.info("Model solved successfully.")
return model
except Exception as e:
[...]
Hi all,
sometimes I get randomly these errors when calling model.solve:
rebuilding the model (aka initializing a new model class and re-adding constraints variables, etc without andy data changes) usually solves this problem. However, I run 24h simulations for up to 5-6 years in total and every like 20 simulations, I get this error. Also, its not traceable and not really reproducible. It really occurs randomly and happens with cplex and highs