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

Support MOI.ScalarNonlinearFunction #25

Closed
Downsite opened this issue Mar 1, 2024 · 3 comments
Closed

Support MOI.ScalarNonlinearFunction #25

Downsite opened this issue Mar 1, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@Downsite
Copy link

Downsite commented Mar 1, 2024

Within jump-dev/JuMP.jl#3106, MathOptInteface has upgraded its support for nonlinear modeling.
A very nice feature is better support of "function tracing", which better supports building models programmatically.

I would be exited to use this feature with GAMS in Julia.

Perhaps you could take a look at the changes done to Baron.jl and see if it is easy to adapt this wrapper.

@renkekuhlmann
Copy link
Member

Thanks for this suggestion. I'll have a look.

@renkekuhlmann renkekuhlmann self-assigned this Mar 6, 2024
@renkekuhlmann renkekuhlmann added the enhancement New feature or request label Mar 6, 2024
@Downsite
Copy link
Author

Meanwhile, a workaround is saving the constructed model to file and reading it with use_nlp_block = true

    readprob = MOI.FileFormats.Model(format =  MOI.FileFormats.FORMAT_MOF,use_nlp_block = true)
    MOI.read_from_file(readprob, "temp_model.mof.json")
    model = Model(GAMS.Optimizer)
    MOI.copy_to(model,readprob)

maybe there is a more elegant way, but this works.

@renkekuhlmann
Copy link
Member

MOI.ScalarNonlinearFunction will be supported with v0.5.0 (should be available for update very soon). Thanks again for making me aware of this! If you experience any issues, don't hesitate to create a new issue.

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

No branches or pull requests

2 participants