Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to maximize an objective function? #168

Closed
Martin-Jung opened this issue Sep 26, 2023 · 2 comments · Fixed by #170
Closed

Option to maximize an objective function? #168

Martin-Jung opened this issue Sep 26, 2023 · 2 comments · Fixed by #170

Comments

@Martin-Jung
Copy link

Hi, this is an awesome and very useful package and so far works like a charm assuming I do everything right :)
I have a question with regards to the objective function. Unless I have missed it in the documentation or API, it seems it is only possible to minimize a certain objective. Of course one can transform the objective function, but for clarity it might be easier to formulate it as maximization problem in some cases.

This could be potentially be added simply as a parameter to add_objective?
E.g. m.add_objective(..., type = "max")

@FabianHofmann
Copy link
Collaborator

Hey @Martin-Jung, thank you for the kind words :) Indeed, I have been thinking about this quite often. It should be very straight-forward to implement a flexible objective sense. The cleanest way would be to create a dedicated objective class which can carry additional information. Let's leave the issue open, and eventually in the next weeks I can implement this :)

@aurelije
Copy link
Contributor

aurelije commented Sep 28, 2023

I have noticed it as well. It can be circumvented but it is suboptimal solution for us, professionals in finding optimum :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants