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

DNM: test #3919 #3920

Merged
merged 5 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 20 additions & 17 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ const _HAS_GUROBI = try
catch
false
end
@show _HAS_GUROBI

const _GUROBI_EXCLUDES = String[]
if !_HAS_GUROBI
push!(_GUROBI_EXCLUDES, "benders_decomposition.jl")
push!(_GUROBI_EXCLUDES, "tsp_lazy_constraints.jl")
push!(_GUROBI_EXCLUDES, "callbacks.jl")
push!(_GUROBI_EXCLUDES, "multiple_solutions.jl")
push!(_GUROBI_EXCLUDES, "benders_decomposition")
push!(_GUROBI_EXCLUDES, "tsp_lazy_constraints")
push!(_GUROBI_EXCLUDES, "callbacks")
push!(_GUROBI_EXCLUDES, "multiple_solutions")
end

# ==============================================================================
Expand Down Expand Up @@ -74,8 +75,12 @@ end

function _file_list(full_dir, relative_dir, extension)
function filter_fn(filename)
return endswith(filename, extension) &&
all(f -> _HAS_GUROBI || !endswith(filename, f), _GUROBI_EXCLUDES)
if !endswith(filename, extension)
return false
elseif _HAS_GUROBI
return true
end
return all(f -> !endswith(filename, f * extension), _GUROBI_EXCLUDES)
end
return map(filter!(filter_fn, sort!(readdir(full_dir)))) do file
return joinpath(relative_dir, file)
Expand Down Expand Up @@ -323,9 +328,7 @@ jump_api_reference = DocumenterReference.automatic_reference_documentation(;
# This constant dictates the layout of the documentation. It is manually
# constructed so that we can have control over the order in which pages are
# shown. If you add a new page to the documentation, make sure to add it here!

filter_empty(x...) = filter(!isempty, collect(x))

#
# !!! warning
# If you move any of the top-level chapters around, make sure to update the
# index of the "release_notes.md" in the section which builds the PDF.
Expand All @@ -346,7 +349,7 @@ const _PAGES = [
],
"Transitioning" =>
["tutorials/transitioning/transitioning_from_matlab.md"],
"Linear programs" => filter_empty(
"Linear programs" => [
"tutorials/linear/introduction.md",
"tutorials/linear/knapsack.md",
"tutorials/linear/diet.md",
Expand All @@ -366,12 +369,12 @@ const _PAGES = [
"tutorials/linear/sudoku.md",
"tutorials/linear/n-queens.md",
"tutorials/linear/constraint_programming.md",
_HAS_GUROBI ? "tutorials/linear/callbacks.md" : "",
"tutorials/linear/callbacks.md",
"tutorials/linear/lp_sensitivity.md",
"tutorials/linear/basis.md",
"tutorials/linear/mip_duality.md",
_HAS_GUROBI ? "tutorials/linear/multiple_solutions.md" : "",
),
"tutorials/linear/multiple_solutions.md",
],
"Nonlinear programs" => [
"tutorials/nonlinear/introduction.md",
"tutorials/nonlinear/simple_examples.md",
Expand Down Expand Up @@ -400,14 +403,14 @@ const _PAGES = [
"tutorials/conic/ellipse_fitting.md",
"tutorials/conic/quantum_discrimination.md",
],
"Algorithms" => filter_empty(
_HAS_GUROBI ? "tutorials/algorithms/benders_decomposition.md" : "",
"Algorithms" => [
"tutorials/algorithms/benders_decomposition.md",
"tutorials/algorithms/cutting_stock_column_generation.md",
_HAS_GUROBI ? "tutorials/algorithms/tsp_lazy_constraints.md" : "",
"tutorials/algorithms/tsp_lazy_constraints.md",
"tutorials/algorithms/rolling_horizon.md",
"tutorials/algorithms/parallelism.md",
"tutorials/algorithms/pdhg.md",
),
],
"Applications" => [
"tutorials/applications/power_systems.md",
"tutorials/applications/optimal_power_flow.md",
Expand Down
8 changes: 8 additions & 0 deletions docs/src/tutorials/algorithms/benders_decomposition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
```@meta
EditURL = "benders_decomposition.jl"
```

# [Benders decomposition](@id benders_decomposition_classical)

This page is a placeholder that appears only if the documentation is built from
a fork.
8 changes: 8 additions & 0 deletions docs/src/tutorials/algorithms/tsp_lazy_constraints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
```@meta
EditURL = "tsp_lazy_constraints.jl"
```

# [Traveling Salesperson Problem](@id tsp_lazy)

This page is a placeholder that appears only if the documentation is built from
a fork.
8 changes: 8 additions & 0 deletions docs/src/tutorials/linear/callbacks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
```@meta
EditURL = "callbacks.jl"
```

# [Callbacks](@id callbacks_tutorial)

This page is a placeholder that appears only if the documentation is built from
a fork.
8 changes: 8 additions & 0 deletions docs/src/tutorials/linear/multiple_solutions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
```@meta
EditURL = "multiple_solutions.jl"
```

# Finding multiple feasible solutions

This page is a placeholder that appears only if the documentation is built from
a fork.
Loading