From 77696851d895c5c12a4d9076f687643fce198425 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Mon, 25 Sep 2023 12:32:20 +0000 Subject: [PATCH] build based on 670c3c0 --- dev/.documenter-siteinfo.json | 2 +- dev/algorithms/index.html | 12 ++++++------ dev/index.html | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 2be69a2..2ce9f72 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-09-25T12:21:23","documenter_version":"1.0.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-09-25T12:32:16","documenter_version":"1.0.1"}} \ No newline at end of file diff --git a/dev/algorithms/index.html b/dev/algorithms/index.html index 34f77ae..07c20b3 100644 --- a/dev/algorithms/index.html +++ b/dev/algorithms/index.html @@ -1,20 +1,20 @@ -Algorithms · GraphsOptim.jl

Algorithms

GraphsOptimModule
GraphsOptim

A package for graph optimization algorithms that rely on mathematical programming.

source

Flow

GraphsOptim.min_cost_flowFunction
min_cost_flow(
+Algorithms · GraphsOptim.jl

Algorithms

GraphsOptimModule
GraphsOptim

A package for graph optimization algorithms that rely on mathematical programming.

source

Flow

GraphsOptim.min_cost_flowFunction
min_cost_flow(
     g, vertex_demand, edge_cost, edge_min_capacity, edge_max_capacity;
     integer, optimizer
-)

Compute a minimum cost flow over a directed graph.

Arguments

  • g::Graphs.AbstractGraph: a directed graph G = (V, E)
  • vertex_demand::AbstractVector: a vector in Rⱽ giving the flow requested by each vertex (should be positive for sinks, negative for sources and zero elsewhere)
  • edge_cost::AbstractMatrix: a vector in Rᴱ giving the cost of a unit of flow on each edge
  • edge_min_capacity::AbstractMatrix: a vector in Rᴱ giving the minimum flow allowed on each edge
  • edge_max_capacity::AbstractMatrix: a vector in Rᴱ giving the maximum flow allowed on each edge

Keyword arguments

  • integer::Bool: whether the flow should be integer-valued or real-valued
  • optimizer: JuMP-compatible solver (default is HiGHS.Optimizer)
source
GraphsOptim.min_cost_flow!Function
min_cost_flow!(
+)

Compute a minimum cost flow over a directed graph.

Arguments

  • g::Graphs.AbstractGraph: a directed graph G = (V, E)
  • vertex_demand::AbstractVector: a vector in Rⱽ giving the flow requested by each vertex (should be positive for sinks, negative for sources and zero elsewhere)
  • edge_cost::AbstractMatrix: a vector in Rᴱ giving the cost of a unit of flow on each edge
  • edge_min_capacity::AbstractMatrix: a vector in Rᴱ giving the minimum flow allowed on each edge
  • edge_max_capacity::AbstractMatrix: a vector in Rᴱ giving the maximum flow allowed on each edge

Keyword arguments

  • integer::Bool: whether the flow should be integer-valued or real-valued
  • optimizer: JuMP-compatible solver (default is HiGHS.Optimizer)
source
GraphsOptim.min_cost_flow!Function
min_cost_flow!(
     model,
     g, vertex_demand, edge_cost, edge_min_capacity, edge_max_capacity;
     var_name, integer
-)

Modify a JuMP model by adding the variable, constraints and objective necessary to compute a minimum cost flow over a directed graph.

The flow variable will be named var_name, see min_cost_flow for details on the other arguments.

source

We denote by:

  • $f$ the edge flow variable
  • $c$ the edge cost
  • $a$ and $b$ the min and max edge capacity
  • $d$ the vertex demand

The objective function is

\[\min_{f \in \mathbb{R}^E} \sum_{(u, v) \in E} c(u, v) f(u, v)\]

The edge capacity constraint dictates that for all $(u, v) \in E$,

\[a(u, v) \leq f(u, v) \leq b(u, v)\]

The flow conservation constraint with node demand dictates that for all $v \in V$,

\[f^-(v) = d(v) + f^+(v)\]

where the incoming flow $f^-(v)$ and outgoing flow $f^+(v)$ are defined as

\[f^-(v) = \sum_{u \in N^-(v)} f(u, v) \quad \text{and} \quad f^+(v) = \sum_{w \in N^+(v)} f(v, w)\]

Assignment

Work in progress

Come back later!

GraphsOptim.min_cost_assignmentFunction
min_cost_assignment(
+)

Modify a JuMP model by adding the variable, constraints and objective necessary to compute a minimum cost flow over a directed graph.

The flow variable will be named var_name, see min_cost_flow for details on the other arguments.

source

We denote by:

  • $f$ the edge flow variable
  • $c$ the edge cost
  • $a$ and $b$ the min and max edge capacity
  • $d$ the vertex demand

The objective function is

\[\min_{f \in \mathbb{R}^E} \sum_{(u, v) \in E} c(u, v) f(u, v)\]

The edge capacity constraint dictates that for all $(u, v) \in E$,

\[a(u, v) \leq f(u, v) \leq b(u, v)\]

The flow conservation constraint with node demand dictates that for all $v \in V$,

\[f^-(v) = d(v) + f^+(v)\]

where the incoming flow $f^-(v)$ and outgoing flow $f^+(v)$ are defined as

\[f^-(v) = \sum_{u \in N^-(v)} f(u, v) \quad \text{and} \quad f^+(v) = \sum_{w \in N^+(v)} f(v, w)\]

Assignment

Work in progress

Come back later!

GraphsOptim.min_cost_assignmentFunction
min_cost_assignment(
     edge_cost;
     optimizer
-)

Compute a minimum cost assignment over a bipartite graph.

Arguments

  • edge_cost::AbstractMatrix: a matrix in Rᵁˣⱽ giving the cost of matching u ∈ U to v ∈ V

Keyword arguments

  • integer::Bool: whether the flow should be integer-valued or real-valued
  • optimizer: JuMP-compatible solver (default is HiGHS.Optimizer)
source
GraphsOptim.min_cost_assignment!Function
min_cost_assignment!(
+)

Compute a minimum cost assignment over a bipartite graph.

Arguments

  • edge_cost::AbstractMatrix: a matrix in Rᵁˣⱽ giving the cost of matching u ∈ U to v ∈ V

Keyword arguments

  • integer::Bool: whether the flow should be integer-valued or real-valued
  • optimizer: JuMP-compatible solver (default is HiGHS.Optimizer)
source
GraphsOptim.min_cost_assignment!Function
min_cost_assignment!(
     model,
     edge_cost;
     var_name, integer
-)

Modify a JuMP model by adding the variable, constraints and objective necessary to compute a minimum cost assignment over a bipartite graph.

The assignment variable will be named var_name, see min_cost_assignment for details on the other arguments.

source

Graph matching

Work in progress

Come back later!

GraphsOptim.graph_matchingFunction
graph_matching(
+)

Modify a JuMP model by adding the variable, constraints and objective necessary to compute a minimum cost assignment over a bipartite graph.

The assignment variable will be named var_name, see min_cost_assignment for details on the other arguments.

source

Graph matching

Work in progress

Come back later!

GraphsOptim.graph_matchingFunction
graph_matching(
     algo, A, B;
     optimizer, P_init, max_iter, tol,
     max_iter_sinkhorn, regularizer
-)

Compute an approximately optimal alignment between two graphs using one of two variants of Frank-Wolfe (FAQ or GOAT)

The output is a tuple that contains:

  • the permutation matrix P defining the alignment;
  • the distance between the permuted graphs;
  • a boolean indicating if the algorithm converged.

Arguments

  • algo: allows dispatch based on the choice of algorithm, either FAQ() or GOAT()
  • A: the adjacency matrix of the first graph
  • B: the adjacency matrix of the second graph

Keyword arguments

For both algorithms:

  • optimizer: JuMP-compatible solver (default is HiGHS.Optimizer)
  • P_init: initialization matrix (default value is a flat doubly stochastic matrix).
  • max_iter: maximum iterations of the Frank-Wolfe method (default value is 30).
  • tol: tolerance for the convergence (default value is 0.1).

Only for GOAT:

  • regularization: penalty coefficient in the Sinkhorn algorithm (default value is 100.0).
  • max_iter_sinkhorn: maximum iterations of the Sinkhorn algorithm (default value is 500).

References

source
GraphsOptim.graph_matching_step_sizeFunction
graph_matching_step_size(A, B, P, Q)

Given the adjacency matrices A and B, the doubly stochastic matrix P and the direction matrix Q, return the step size of the Frank-Wolfe method for graph matching algorithms.

source

Utils

+)

Compute an approximately optimal alignment between two graphs using one of two variants of Frank-Wolfe (FAQ or GOAT)

The output is a tuple that contains:

  • the permutation matrix P defining the alignment;
  • the distance between the permuted graphs;
  • a boolean indicating if the algorithm converged.

Arguments

  • algo: allows dispatch based on the choice of algorithm, either FAQ() or GOAT()
  • A: the adjacency matrix of the first graph
  • B: the adjacency matrix of the second graph

Keyword arguments

For both algorithms:

  • optimizer: JuMP-compatible solver (default is HiGHS.Optimizer)
  • P_init: initialization matrix (default value is a flat doubly stochastic matrix).
  • max_iter: maximum iterations of the Frank-Wolfe method (default value is 30).
  • tol: tolerance for the convergence (default value is 0.1).

Only for GOAT:

  • regularization: penalty coefficient in the Sinkhorn algorithm (default value is 100.0).
  • max_iter_sinkhorn: maximum iterations of the Sinkhorn algorithm (default value is 500).

References

source
GraphsOptim.graph_matching_step_sizeFunction
graph_matching_step_size(A, B, P, Q)

Given the adjacency matrices A and B, the doubly stochastic matrix P and the direction matrix Q, return the step size of the Frank-Wolfe method for graph matching algorithms.

source

Utils

diff --git a/dev/index.html b/dev/index.html index db63472..3ca6ccb 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · GraphsOptim.jl

GraphsOptim

<!– Stable –> Dev Build Status Coverage Code Style: Blue

A package for graph optimization algorithms that rely on mathematical programming.

Getting started

This package is still experimental, which is why it is not yet registered. To install it, you need to use the GitHub URL:

using Pkg; Pkg.add(url="https://github.com/JuliaGraphs/GraphsOptim.jl")

Roadmap

This package only contains a few algorithms, and we would like to add more. New contributors are always welcome: just pick a problem from our roadmap issue, open a pull request following the guidelines, and we will help you get it merged!

+Home · GraphsOptim.jl

GraphsOptim

<!– Stable –> Dev Build Status Coverage Code Style: Blue

A package for graph optimization algorithms that rely on mathematical programming.

Getting started

This package is still experimental, which is why it is not yet registered. To install it, you need to use the GitHub URL:

using Pkg; Pkg.add(url="https://github.com/JuliaGraphs/GraphsOptim.jl")

Roadmap

This package only contains a few algorithms, and we would like to add more. New contributors are always welcome: just pick a problem from our roadmap issue, open a pull request following the guidelines, and we will help you get it merged!