• 1.4k
• 4
• 12

I don't know much about Python-mip but looking at the code, maximize expects a LinExpr, so I tried:

model.objective = maximize(1*x)


which gives the expected output.

Edit: I also opened a PR to allow maximize(var) and minimize(var).

Edit: The PR has been merged, this won'tshouldn't be a problem in >1.7.2.

• 1.4k
• 4
• 12

I don't know much about Python-mip but looking at the code, maximize expects a LinExpr, so I tried:

model.objective = maximize(1*x)


which gives the expected output.

Edit: I also opened a PR to allow maximize(var) and minimize(var).

Edit: The PR has been merged, this won't be a problem in >1.7.2.

• 1.4k
• 4
• 12

I don't know much about Python-mip but looking at the code, maximize expects a LinExpr, so I tried:

model.objective = maximize(1*x)


which gives the expected output.

Edit: I also opened a PR to allow maximize(var) and minimize(var).

Fix github url to a tag
• 1.4k
• 4
• 12
deleted 55 characters in body
• 1.4k
• 4
• 12