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

Updates for New NL Interface #256

Merged
merged 2 commits into from
Jan 31, 2024
Merged

Updates for New NL Interface #256

merged 2 commits into from
Jan 31, 2024

Conversation

ccoffrin
Copy link
Member

@odow, can you give me a hand with how to update the tests of the form?

    func = constraint.func
    set = constraint.set
    @test isapprox(set.value, 0.64266 / get_base_flow(data); atol = 1e-4)
    @test isa(set, MOI.EqualTo{Float64})
    @test length(func.terms) == 1

Copy link

codecov bot commented Jan 24, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (eda7791) 79.35% compared to head (73f285b) 79.35%.
Report is 1 commits behind head on master.

Files Patch % Lines
src/form/wp.jl 72.72% 3 Missing ⚠️
src/core/objective.jl 33.33% 2 Missing ⚠️
src/core/constraint_transient.jl 75.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #256   +/-   ##
=======================================
  Coverage   79.35%   79.35%           
=======================================
  Files          39       39           
  Lines        5579     5579           
=======================================
  Hits         4427     4427           
  Misses       1152     1152           

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

@odow
Copy link
Contributor

odow commented Jan 24, 2024

I'd need to take a deeper look. The tests fail because it looks like it's trying to use HiGHS for a nonlinear model???

@test length(func.terms) == 1
var_ref = var(gm, :f_pipe)[128]
@test isapprox(func.terms[var_ref], -1.0; atol = 1e-4)

This just looks like it is testing that func is -1.0 * var_ref?

I don't see why this would break with the changes.

@odow
Copy link
Contributor

odow commented Jan 24, 2024

Just an FYI that I'm only online partially tomorrow, and then I'm away Fri/Sat/Sun NZ time so it may be next week before I get a proper look.

@ccoffrin
Copy link
Member Author

No problem on the delay. From what I can tell the primary issue is this test @test isa(set, MOI.EqualTo{Float64}) probably the set type needs to change due to the new NL data structure.

@odow
Copy link
Contributor

odow commented Jan 29, 2024

This was what I needed to get tests passing: lanl-ansi/Juniper.jl#263

diff --git a/test/runtests.jl b/test/runtests.jl
index f92f38f..c10df8b 100644
--- a/test/runtests.jl
+++ b/test/runtests.jl
@@ -34,6 +34,8 @@ juniper_solver = JuMP.optimizer_with_attributes(
     "nl_solver" => ipopt_solver,
     "mip_solver" => highs_solver,
     "log_levels" => [],
+    # TODO(odow): bug in Juniper
+    "feasibility_pump" => false,
 )
 
 

@odow
Copy link
Contributor

odow commented Jan 29, 2024

This is the patch for the documentation

diff --git a/docs/Project.toml b/docs/Project.toml
index dfa65cd..3a52a5d 100644
--- a/docs/Project.toml
+++ b/docs/Project.toml
@@ -1,2 +1,5 @@
 [deps]
 Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
+
+[compat]
+Documenter = "0.27"

@odow
Copy link
Contributor

odow commented Jan 29, 2024

Doc fix is #257

Juniper just needs a new tag: lanl-ansi/Juniper.jl#266

InfrastructureModels = "~0.6, ~0.7"
Ipopt = "~0.8, ~0.9, ~1"
JSON = "~0.18, ~0.19, ~0.20, ~0.21"
JuMP = "~0.22, ~0.23, 1"
JuMP = "1.15"
Juniper = ">= 0.4"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Juniper = ">= 0.4"
Juniper = "0.9.2"

Once lanl-ansi/Juniper.jl#266 is tagged

@odow
Copy link
Contributor

odow commented Jan 30, 2024

@ccoffrin try rebasing this on master to get the doc fix, and bump the compat for Juniper

@ccoffrin ccoffrin merged commit 7a0dc25 into master Jan 31, 2024
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants