modeling physics with differential algebraic equations
play

Modeling Physics with Differential-Algebraic Equations Lecture 2 - PowerPoint PPT Presentation

Modeling Physics with Differential-Algebraic Equations Lecture 2 Structural Analysis: Index Reduction COMASIC (M2) Khalil Ghorbal k halil.ghorbal@inria.fr K. Ghorbal (INRIA) 1 COMASIC M2 1 / 23 Summary lecture 1 1 Ordinary Differential


  1. Modeling Physics with Differential-Algebraic Equations Lecture 2 Structural Analysis: Index Reduction COMASIC (M2) Khalil Ghorbal k halil.ghorbal@inria.fr K. Ghorbal (INRIA) 1 COMASIC M2 1 / 23

  2. Summary lecture 1 1 Ordinary Differential Equations: • Cauchy-Lipschitz theorem: existence and uniqueness of solutions • Liouville theorem: no closed form solutions in general • Numerical integration: convergence and stability • Qualitative analysis: invariant regions 2 Differential-Algebraic Equations • Informal Introduction • Examples • Different Forms K. Ghorbal (INRIA) 2 COMASIC M2 2 / 23

  3. Outline 1 Matching Problem 2 BLT Decomposition 3 Pantelides Algorithm K. Ghorbal (INRIA) 2 COMASIC M2 2 / 23

  4. Structural Analysis of Systems of Equations: Example Consider the following system of equations:  f 1 ( x 1 ) = 0  f 2 ( x 1 , x 2 , x 3 ) = 0 f 3 ( x 3 ) = 0  K. Ghorbal (INRIA) 3 COMASIC M2 3 / 23

  5. Structural Analysis of Systems of Equations: Example Consider the following system of equations:  f 1 ( x 1 ) = 0  f 2 ( x 1 , x 2 , x 3 ) = 0 f 3 ( x 3 ) = 0  Incidence Matrix x 1 x 2 x 3   1 0 0 f 1 1 1 1 f 2   0 0 1 f 3 K. Ghorbal (INRIA) 3 COMASIC M2 3 / 23

  6. Structural Analysis of Systems of Equations: Example Consider the following system of equations:  f 1 ( x 1 ) = 0  f 2 ( x 1 , x 2 , x 3 ) = 0 f 3 ( x 3 ) = 0  Incidence Matrix Bipartite Graph (Bigraph) x 1 f 1 x 1 x 2 x 3   1 0 0 f 1 1 1 1 x 2 f 2 f 2   0 0 1 f 3 x 3 f 3 K. Ghorbal (INRIA) 3 COMASIC M2 3 / 23

  7. Bigraphs and Matching Bipartite graph ( F , V , E ) • F : set of equations • V : set of variables (disjoint with F ) • E : subset of the cartesian product F × V Example: a triangle is not a bipartite graph. Matching Problem Given a bipartite graph ( F , V , E ), assign one and only one equation f ∈ F to each variable v ∈ V such that ( f , v ) ∈ E . K. Ghorbal (INRIA) 4 COMASIC M2 4 / 23

  8. Matching Problem: Intuitions Algorithm For each equation, pick up its first unmatched variable. The procedure succeeds whenever all variables are matched. Matching x 1 f 1 x 2 f 2 x 3 f 3 K. Ghorbal (INRIA) 5 COMASIC M2 5 / 23

  9. Matching Problem: Intuitions Algorithm (incomplete/wrong) For each equation, pick up its first unmatched variable. The procedure succeeds whenever all variables are matched. Matching Backtrack ( f 2 , x 3 ) x 1 f 1 x 1 f 1 x 2 f 2 x 3 f 2 x 3 f 3 x 2 f 3 K. Ghorbal (INRIA) 5 COMASIC M2 5 / 23

  10. Matching Problem: Algorithm Let G : ( V , E ) denote a graph • Matching : A matching is a set of pairwise non-adjacent edges. • Maximum Matching : A matching having the maximum cardinality, denoted ν ( G ). • Perfect Matching : A matching such that every vertex of the graph is incident to exactly one edge of the matching. K. Ghorbal (INRIA) 6 COMASIC M2 6 / 23

  11. Matching Problem: Algorithm Let G : ( V , E ) denote a graph • Matching : A matching is a set of pairwise non-adjacent edges. • Maximum Matching : A matching having the maximum cardinality, denoted ν ( G ). • Perfect Matching : A matching such that every vertex of the graph is incident to exactly one edge of the matching. K. Ghorbal (INRIA) 6 COMASIC M2 6 / 23

  12. Matching Problem: Algorithm Let G : ( V , E ) denote a graph • Matching : A matching is a set of pairwise non-adjacent edges. • Maximum Matching : A matching having the maximum cardinality, denoted ν ( G ). • Perfect Matching : A matching such that every vertex of the graph is incident to exactly one edge of the matching. K. Ghorbal (INRIA) 6 COMASIC M2 6 / 23

  13. Matching Problem: Algorithm Let G : ( V , E ) denote a graph • Matching : A matching is a set of pairwise non-adjacent edges. • Maximum Matching : A matching having the maximum cardinality, denoted ν ( G ). • Perfect Matching : A matching such that every vertex of the graph is incident to exactly one edge of the matching. Proposition G has a perfect matching if and only if | G | = 2 ν ( G ). ➻ For systems of n variables and n equations: (1) compute ν ( G ), (2) check if ν ( G ) = n . K. Ghorbal (INRIA) 6 COMASIC M2 6 / 23

  14. Hopcroft-Karp Algorithm (1973) • Input: bipartite graph ( U , V , E ) • Output: maximum cardinality matching � • Complexity: (worst case) O ( | E | | V | ) Augmented Shortest Path At each phase: • BFS: alternate between U and V where one starts from an unmatched variable in U and reaches an unmatched variable in V while following a matched edge from V to U (this gives an augmented shortest path). • DFS: selects one shortest path out of the many selected ones by the BFS. • update the matching set K. Ghorbal (INRIA) 7 COMASIC M2 7 / 23

  15. Example Source: Wikipedia K. Ghorbal (INRIA) 8 COMASIC M2 8 / 23

  16. Maximum Transversal Problem Matching Incidence Matrix x 1 f 1 x 1 x 2 x 3   1 0 0 f 1 x 3 f 2 1 1 1   f 2   0 0 1 f 3 x 2 f 3 Maximum Transversal Problem Finding a permutation that places a maximum number of non-zero on the diagonal of a sparse matrix. K. Ghorbal (INRIA) 9 COMASIC M2 9 / 23

  17. Maximum Transversal Problem Matching Incidence Matrix x 1 f 1 x 1 x 2 x 3   1 0 0 f 1 x 3 f 2 1 1 1   f 2   0 0 1 f 3 x 2 f 3 x 1 x 3 x 2   1 − − Maximum Transversal Problem f 1 Finding a permutation that 0 1 −   f 3   places a maximum number of 1 1 1 f 2 non-zero on the diagonal of a sparse matrix. ❥ Very useful prior to decomposing the matrix using Gaussian elimination. K. Ghorbal (INRIA) 9 COMASIC M2 9 / 23

  18. Outline 1 Matching Problem 2 BLT Decomposition 3 Pantelides Algorithm K. Ghorbal (INRIA) 9 COMASIC M2 9 / 23

  19. Block-Lower-Triangular (BLT) Form Goal: Given a square matrix M ( m ij ∈ { 0 , 1 } ), find a permutation to put M in a block lower triangular form. x 1 x 2 x 3 x 4  1 0 1 0  f 1 1 1 0 1 f 2     0 1 0 0 f 3   1 1 1 0 f 4 x 2 x 1 x 3 x 4  1 0 0 0  f 3 0 1 1 0 f 1     1 1 1 0 f 4   1 1 0 1 f 2 K. Ghorbal (INRIA) 10 COMASIC M2 10 / 23

  20. BLT Decomposition Blocks of dimension > 1 (called algebraic loops ) are (numerically) solved by Gaussian elimination if linear or Newton methods if nonlinear. K. Ghorbal (INRIA) 11 COMASIC M2 11 / 23

  21. BLT Decomposition Blocks of dimension > 1 (called algebraic loops ) are (numerically) solved by Gaussian elimination if linear or Newton methods if nonlinear. Three main steps 1 Find a (perfect) matching 2 Construct a dependency graph 3 Find strongly connected components (Tarjan’s algorithm) K. Ghorbal (INRIA) 11 COMASIC M2 11 / 23

  22. BLT Decomposition: Example Perfect Matching Bipartite Graph (Bigraph) Incidence Matrix x 1 f 1 x 1 x 2 x 3 x 4   1 0 1 0 f 1 x 2 1 1 0 1 f 2   f 2    0 1 0 0  f 3   1 1 1 0 x 3 f 3 f 4 x 4 f 4 K. Ghorbal (INRIA) 12 COMASIC M2 12 / 23

  23. BLT Decomposition: Example Dependency Graph Incidence Matrix Dependency Graph f 1 x 1 x 2 x 3 x 4   1 0 1 0 f 1 1 1 0 1   f 2   f 4 f 2  0 1 0 0  f 3   1 1 1 0 f 4 f 3 K. Ghorbal (INRIA) 13 COMASIC M2 13 / 23

  24. BLT Decomposition: Example Strongly Connected Components Dependency Graph BLT Decomposition f 1 x 2 x 1 x 3 x 4  1 0 0 0  f 3 2 0 1 1 0 f 1   f 4 f 2 3   1 1 1 0 f 4   1 1 0 1 f 2 f 3 1 K. Ghorbal (INRIA) 14 COMASIC M2 14 / 23

  25. Strongly Connected Components (SCC) Definitions • A directed graph is strongly connected if every vertex is reachable from every other vertex. • Strongly connected components of a directed graph form a partition into subgraphs which are themselves strongly connected. • By contracting each strongly connected component into one vertex, one obtains a condensation of the original graph into a directed acyclic graph . K. Ghorbal (INRIA) 15 COMASIC M2 15 / 23

  26. Strongly Connected Components (SCC) Definitions • A directed graph is strongly connected if every vertex is reachable from every other vertex. • Strongly connected components of a directed graph form a partition into subgraphs which are themselves strongly connected. • By contracting each strongly connected component into one vertex, one obtains a condensation of the original graph into a directed acyclic graph . K. Ghorbal (INRIA) 15 COMASIC M2 15 / 23

  27. Strongly Connected Components (SCC) Definitions • A directed graph is strongly connected if every vertex is reachable from every other vertex. • Strongly connected components of a directed graph form a partition into subgraphs which are themselves strongly connected. • By contracting each strongly connected component into one vertex, one obtains a condensation of the original graph into a directed acyclic graph . K. Ghorbal (INRIA) 15 COMASIC M2 15 / 23

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend