As far as I understand MOI.set is primarily used for setting attributes.
However, #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.
As far as I understand
MOI.setis primarily used for setting attributes.However, #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_fileread_from_filesubmittransformA partial counter argument is:
Utilities.PenaltyRelaxation, but it is amodifynot even asetI 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.