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

Add Uno_jll to MINLPTests #190

Merged
merged 32 commits into from
Oct 28, 2024
Merged

Add Uno_jll to MINLPTests #190

merged 32 commits into from
Oct 28, 2024

Conversation

odow
Copy link
Member

@odow odow commented Oct 16, 2024

This needs JuliaRegistries/General#117429 (comment)

But there are bunch of other issues:

julia> using JuMP, AmplNLWriter, Uno_jll

julia> model = Model(() -> AmplNLWriter.Optimizer(Uno_jll.amplexe))
A JuMP Model
├ solver: AmplNLWriter
├ objective_sense: FEASIBILITY_SENSE
├ num_variables: 0
├ num_constraints: 0
└ Names registered in the model: none

julia> @variable(model, x)
x

julia> @objective(model, Min, (x - 1)^2)
x² - 2 x + 1

julia> optimize!(model)
libc++abi: terminating due to uncaught exception of type std::invalid_argument: The option file uno.options was not found

@cvanaret: is the options file compulsory? This doesn't align with other AMPL solvers.

So then I did

shell> touch uno.options

julia> optimize!(model)
Argument /var/folders/bg/dzq_hhvx1dxgy6gb5510pxj80000gn/T/jl_hHVzvE/model.nl was ignored
libc++abi: terminating due to uncaught exception of type std::out_of_range: The option logger was not found

But it's not enough to have an empty file, you need the complete set of options

shell> wget https://raw.githubusercontent.com/cvanaret/Uno/refs/heads/main/uno.options
--2024-10-17 11:41:40--  https://raw.githubusercontent.com/cvanaret/Uno/refs/heads/main/uno.options
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8000::154, 2606:50c0:8001::154, 2606:50c0:8002::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8000::154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5925 (5.8K) [text/plain]
Saving to: ‘uno.options.1’

uno.options.1                                      100%[================================================================================================================>]   5.79K  --.-KB/s    in 0s      

2024-10-17 11:41:41 (12.9 MB/s) - ‘uno.options.1’ saved [5925/5925]

shell> mv uno.options.1 uno.options

julia> optimize!(model)
Argument /var/folders/bg/dzq_hhvx1dxgy6gb5510pxj80000gn/T/jl_DLkXt2/model.nl was ignored
can't open -AMPL.nl

and now this fails because the default action is to pass -AMPL:

cmd = `$(solver_path) $(nl_filename) -AMPL $(options)`

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.80%. Comparing base (bb82f27) to head (c0dc7fb).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #190   +/-   ##
=======================================
  Coverage   98.80%   98.80%           
=======================================
  Files           1        1           
  Lines          84       84           
=======================================
  Hits           83       83           
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@odow

This comment was marked as resolved.

@odow

This comment was marked as resolved.

@odow

This comment was marked as resolved.

src/AmplNLWriter.jl Outdated Show resolved Hide resolved
@odow

This comment was marked as resolved.

@odow

This comment was marked as resolved.

README.md Outdated Show resolved Hide resolved
@odow

This comment was marked as resolved.

@odow

This comment was marked as resolved.

@odow

This comment was marked as resolved.

@amontoison

This comment was marked as resolved.

@odow

This comment was marked as resolved.

@amontoison

This comment was marked as resolved.

@odow

This comment was marked as resolved.

@odow

This comment was marked as resolved.

@amontoison

This comment was marked as duplicate.

@odow

This comment was marked as resolved.

@amontoison

This comment was marked as resolved.

@cvanaret

This comment was marked as resolved.

@odow

This comment was marked as resolved.

@odow

This comment was marked as resolved.

test/MOI_wrapper.jl Outdated Show resolved Hide resolved
@odow
Copy link
Member Author

odow commented Oct 27, 2024

Okay. I think we're pretty much there. There are still a few upstream issues, but these are mainly:

README.md Show resolved Hide resolved
@odow odow merged commit e32115c into master Oct 28, 2024
13 checks passed
@odow odow deleted the uno branch October 28, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants