jump-dev / jump-dev/DiffOpt.jl
Discussion: Should `MOI.set` perform complex operations?
- Dominant language
- Julia
- Stars
- 145
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
As far as I understand `MOI.set` is primarily used for setting attributes.
However, https://github.com/jump-dev/DiffOpt.jl/pull/356 introduced:
`function MOI.set(model::Model, ::DiffOpt.ForwardDifferentiate)`
as a replacement to
`function forward_differentiate!(model)`
Historically, performing more complex operations has been left (mostly?) for special functions such as:
- `compute_conflict!`
- `write_to_file`
- `read_from_file`
- `submit`
- `transform`
A partial counter argument is:
- `Utilities.PenaltyRelaxation`, but it is a `modify` not even a `set`
I do think modify here makes sense.
Are there any other arguments to each side? any other precedent?
I would like to have the reasoning for that clarified.
What are de advantages and disadvantages?
Bonus:
As a follow-up, we should have good practices and standards documented to help developers consistently make decisions in these cases.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.