Weird incumbent behavior
AnsweredHello, I have the following problem. I am trying to evaluate the lowe bound and the incumbent via the log of my model and use the glt.get_dataframe() command to create a DataFrame. Unfortunately I get very strange results.
Incumbent BestBd Gap ... LogNumber Seed Version
0 18.08 15.96 0.117257 ... 1 0 10.0.1
1 21.96 16.16 0.264117 ... 2 0 10.0.1
2 19.08 18.02 0.055556 ... 3 0 10.0.1
3 20.62 19.94 0.032978 ... 4 0 10.0.1
4 18.90 17.80 0.058201 ... 5 0 10.0.1
5 19.00 19.00 0.000000 ... 6 0 10.0.1
6 18.16 16.60 0.085903 ... 7 0 10.0.1
Normally the incumbent does not increase with a minimisation problem, but only decreases if it does. What could be the reason for this?
My model is structured something like this:
class Model:
def __init__(self):
self.model = Model()
def variables(self):
def constraints(self):
def objective(self):
def build(self):
self.variables()
self.constraints()
self.objective()
self.model.update()
m = Model()
m.build()
m.model.Params.LogFile = "./test.log"
m.model.optimize()
file='./test.log'
results, timeline = glt.get_dataframe([file], timelines=True)
default_run = timeline["nodelog"]
print(default_run)
0
-
Hi Lorenz,
It looks like the LogNumber is increasing in that small dataframe snippet you show.
I'm guessing you have multiple logs in the one file? Note that Gurobi doesn't overwrite log files, it just appends to them.
- Riley
0
Please sign in to leave a comment.
Comments
1 comment