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

Rename set_parameter to set_attributes #2149

Closed
odow opened this issue Feb 3, 2020 · 1 comment · Fixed by #2150
Closed

Rename set_parameter to set_attributes #2149

odow opened this issue Feb 3, 2020 · 1 comment · Fixed by #2150
Assignees
Milestone

Comments

@odow
Copy link
Member

odow commented Feb 3, 2020

#2141 adds optimizer_with_attributes, so one can go:

model = Model(optimizer_with_attributes(Gurobi.Optimizer, "OutputFlag" => 0))

However, we still have set_parameter, which means

model = Model(Gurobi.Optimizer)
set_parameter(model, "OutputFlag", 0)

It would be more consistent if we renamed set_parameter to set_attribute, with the implication that passing a string was sugar for passing MOI.RawParameter.

In addition, we should add get_attribute.

@odow odow self-assigned this Feb 3, 2020
@mlubin
Copy link
Member

mlubin commented Feb 3, 2020

What about set_optimizer_attribute? We would also want to accept the same types of things as optimizer_with_attributes, i.e., both strings and MOI optimizer attribute objects.

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

Successfully merging a pull request may close this issue.

3 participants