Skip to content

Commit

Permalink
Update test_PythonCall.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Oct 20, 2024
1 parent a9535c5 commit c3a1a7f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/test_PythonCall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ function test_model_Tanh_scalar_GrayBox()
y, formulation =
MathOptAI.add_predictor(model, ml_model, x; gray_box = true)
@test num_variables(model) == 3
@test num_constraints(model; count_variable_in_set_constraints = true) == 1
@test num_constraints(model; count_variable_in_set_constraints = true) == 3
optimize!(model)
@test is_solved_and_feasible(model)
@test (_evaluate_model(filename, value.(x)), value.(y); atol = 1e-5)
Expand Down Expand Up @@ -341,7 +341,7 @@ function test_model_Tanh_scalar_GrayBox_hessian()
gray_box_hessian = true,
)
@test num_variables(model) == 3
@test num_constraints(model; count_variable_in_set_constraints = true) == 1
@test num_constraints(model; count_variable_in_set_constraints = true) == 3
optimize!(model)
@test is_solved_and_feasible(model)
@test (_evaluate_model(filename, value.(x)), value.(y); atol = 1e-5)
Expand Down Expand Up @@ -374,7 +374,7 @@ function test_model_Tanh_vector_GrayBox()
y, formulation =
MathOptAI.add_predictor(model, ml_model, x; gray_box = true)
@test num_variables(model) == 5
@test num_constraints(model; count_variable_in_set_constraints = true) == 2
@test num_constraints(model; count_variable_in_set_constraints = true) == 5
optimize!(model)
@test is_solved_and_feasible(model)
@test (_evaluate_model(filename, value.(x)), value.(y); atol = 1e-5)
Expand All @@ -391,7 +391,7 @@ function test_model_Tanh_vector_GrayBox()
reduced_space = true,
)
@test num_variables(model) == 3
@test num_constraints(model; count_variable_in_set_constraints = true) == 0
@test num_constraints(model; count_variable_in_set_constraints = true) == 3
optimize!(model)
@test is_solved_and_feasible(model)
@test (_evaluate_model(filename, value.(x)), value.(y); atol = 1e-5)
Expand Down Expand Up @@ -429,7 +429,7 @@ function test_model_Tanh_vector_GrayBox_hessian()
gray_box_hessian = true,
)
@test num_variables(model) == 5
@test num_constraints(model; count_variable_in_set_constraints = true) == 2
@test num_constraints(model; count_variable_in_set_constraints = true) == 5
optimize!(model)
@test is_solved_and_feasible(model)
@test (_evaluate_model(filename, value.(x)), value.(y); atol = 1e-5)
Expand All @@ -446,7 +446,7 @@ function test_model_Tanh_vector_GrayBox_hessian()
reduced_space = true,
)
@test num_variables(model) == 3
@test num_constraints(model; count_variable_in_set_constraints = true) == 0
@test num_constraints(model; count_variable_in_set_constraints = true) == 3
optimize!(model)
@test is_solved_and_feasible(model)
@test (_evaluate_model(filename, value.(x)), value.(y); atol = 1e-5)
Expand Down

0 comments on commit c3a1a7f

Please sign in to comment.