jump-dev / jump-dev/DiffOpt.jl

Discussion: Should `MOI.set` perform complex operations?

Offen
#358 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Julia
Sterne
145
Forks
21
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start by reading pull request 356 and the existing uses of MOI.set, then compare them with compute_conflict!, write_to_file, read_from_file, submit, transform, and Utilities.PenaltyRelaxation. Clarify the advantages, disadvantages, and precedents for complex operations in set versus modify, and document agreed standards if the discussion reaches a decision.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
julia
Bereich
backend-api-design
Issue-Typ
Dokumentation
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.