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

Help wanted: update to MathOptInterface #29

Closed
dirkdegel opened this issue Mar 22, 2020 · 4 comments · Fixed by #30
Closed

Help wanted: update to MathOptInterface #29

dirkdegel opened this issue Mar 22, 2020 · 4 comments · Fixed by #30

Comments

@dirkdegel
Copy link

dirkdegel commented Mar 22, 2020

I tried to install the NEOS package in Julia 1.0.4 (see code and error message below.) but the installation failed.

julia> using Pkg

julia> Pkg.add("NEOS")
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
ERROR: The following package names could not be resolved:
 * NEOS (not found in project, manifest or registry)
Please specify by known `name=uuid`.
@odow
Copy link
Member

odow commented Mar 22, 2020

NEOS.jl has not been updated to Julia 1.0

@dirkdegel
Copy link
Author

Hi Oscar,
Thanks for the information. I hope it will be updated. It is a great idea. Thanks Dirk.

@odow
Copy link
Member

odow commented Mar 23, 2020

I'm going to leave this open for the next person who comes along looking.

I have no plans to update this in the near term. It would make a good project for someone looking to get into JuMP/Julia development.

@odow odow reopened this Mar 23, 2020
@odow odow changed the title Installation failed in Julia 1.0.4 Help wanted: update to MathOptInterface Dec 1, 2020
@odow
Copy link
Member

odow commented Dec 1, 2020

This should be pretty achievable now that MathOptInterface has support for various file-formats.

We can start by defining an Optimizer like the following:

struct Optimizer <: MOI.AbstractOptimizer
    model::MOI.Utilities.Model{Float64}
    # ... some other fields for NEOS stuff
end

function MOI.optimize!(model::Optimizer)
    file = MOI.FileFormats.MPS.Model()
    MOI.copy_to(file, model)
    io = IOBuffer()
    write(io, file)
    seekstart(io)
    s_file = read(io, String)
    # send `s_file` to NEOS using current implementation
    return
end

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.

2 participants