Skip to content

Commit

Permalink
docs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
harshangrjn committed Oct 24, 2023
1 parent 7f39814 commit 78268c3
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 277 deletions.
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
9 changes: 4 additions & 5 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Documenter
using Alpine
using Documenter, Alpine
using DocumenterTools: Themes

for w in ("light", "dark")
Expand All @@ -9,12 +8,12 @@ for w in ("light", "dark")
end

Themes.compile(
joinpath(@__DIR__, "src/assets/themes/light.scss"),
joinpath(@__DIR__, "src/assets/themes/documenter-light.css"),
joinpath(@__DIR__, "src/assets/themes/light.scss"),
)
Themes.compile(
joinpath(@__DIR__, "src/assets/themes/dark.scss"),
joinpath(@__DIR__, "src/assets/themes/documenter-dark.css"),
joinpath(@__DIR__, "src/assets/themes/dark.scss"),
)

makedocs(
Expand All @@ -24,7 +23,7 @@ makedocs(
mathengine = Documenter.MathJax(),
prettyurls = get(ENV, "CI", nothing) == "true",
),
strict = true,
# strict = true,
pages = [
"Introduction" => "index.md",
"Choosing Sub-solvers" => "choosingsolver.md",
Expand Down
152 changes: 1 addition & 151 deletions docs/src/assets/themes/dark.scss

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/src/assets/themes/documenter-dark.css.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/src/assets/themes/documenter-light.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/src/assets/themes/documenter-light.css.css

Large diffs are not rendered by default.

114 changes: 1 addition & 113 deletions docs/src/assets/themes/light.scss

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions src/utility.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ function eval_opt_gap(m::Optimizer, lower_bound::Number, upper_bound::Number)

else
m.best_rel_gap = Alp._eval_best_rel_gap(lower_bound, upper_bound, tol)

# If LB > UB
if (m.best_rel_gap > Alp.get_option(m, :rel_gap)) && ((lower_bound - upper_bound) > 1E-1)
error("Lower bound cannot exceed the upper bound in optimality gap evaluation")
if (m.best_rel_gap > Alp.get_option(m, :rel_gap)) &&
((lower_bound - upper_bound) > 1E-1)
error(
"Lower bound cannot exceed the upper bound in optimality gap evaluation",
)
end
end

Expand All @@ -62,12 +65,12 @@ end
function _eval_best_rel_gap(lower_bound::Number, upper_bound::Number, tol::Number)
if isapprox(lower_bound, upper_bound, atol = tol)
return 0.0

elseif isapprox(upper_bound, 0.0; atol = tol) # zero upper bound case
eps = 1 # shift factor
return abs((upper_bound + eps) - (lower_bound + eps)) /
(tol + abs(upper_bound) + eps)
(tol + abs(upper_bound) + eps)

else
return abs(upper_bound - lower_bound) / (tol + abs(upper_bound))
end
Expand Down

0 comments on commit 78268c3

Please sign in to comment.