Skip to content

Add missing API documentation for all exported symbols #3887

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

Merged
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
5 changes: 4 additions & 1 deletion docs/pages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@ pages = [
"basics/Precompilation.md",
"basics/FAQ.md"],
"comparison.md",
"internals.md"
"Internal Details" => Any[
"internals.md",
"internals/structural_transformation.md",
"internals/bipartite_graph.md"]
]
24 changes: 24 additions & 0 deletions docs/src/API/System.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,27 @@ following functions are useful for manipulating namespacing functionality.
ModelingToolkit.renamespace
ModelingToolkit.namespace_equations
```

## Linearization and Analysis

Functions for linearization and analysis of systems.

```@docs
linearization_ap_transform
get_sensitivity_function
get_comp_sensitivity_function
get_looptransfer_function
get_sensitivity
get_comp_sensitivity
get_looptransfer
open_loop
```

## Additional Equation Classification

```@docs
alg_equations
diff_equations
has_alg_equations
has_diff_equations
```
16 changes: 14 additions & 2 deletions docs/src/internals.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# Internal Details

This is a page for detailing some of the inner workings to help future
contributors to the library.
This section documents the internal implementation details of ModelingToolkit. These APIs are not considered stable and may change without notice in non-breaking releases. They are documented here to help future contributors understand the library's inner workings.

## Overview

ModelingToolkit's internal architecture consists of several key components:

- **Structural Transformation**: Algorithms for transforming equation systems, including index reduction, tearing, and algebraic simplification
- **Bipartite Graphs**: Graph representations used to analyze relationships between equations and variables
- **System Structure**: Internal representations of system state and transformations

These components work together to enable ModelingToolkit's symbolic manipulation and code generation capabilities.

!!! warning
The functions and types documented in this section are internal implementation details. Users should not rely on these APIs as they may change or be removed without deprecation warnings.
80 changes: 80 additions & 0 deletions docs/src/internals/bipartite_graph.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Bipartite Graphs

!!! warning "Internal API"
The functions documented on this page are internal implementation details of ModelingToolkit. They are not part of the public API and may change or be removed without notice in non-breaking releases. This documentation is provided to help contributors understand the codebase.

ModelingToolkit uses bipartite graphs to represent relationships between equations and variables in systems. These functions provide tools for working with and analyzing these graphs.

## Graph Types

```@docs
BipartiteGraph
BipartiteEdge
DiCMOBiGraph
DiffGraph
```

## Vertex Operations

```@docs
𝑠vertices
𝑑vertices
has_𝑠vertex
has_𝑑vertex
nsrcs
ndsts
```

## Neighbor Operations

```@docs
𝑠neighbors
𝑑neighbors
set_neighbors!
```

## Edge Operations

```@docs
𝑠edges
𝑑edges
```

## Graph Views and Modifications

```@docs
invview
delete_srcs!
delete_dsts!
```

## Matching Algorithms

```@docs
maximal_matching
construct_augmenting_path!
```

## Dependency Analysis

```@docs
equation_dependencies
variable_dependencies
eqeq_dependencies
varvar_dependencies
map_variables_to_equations
```

## Graph Conversion

```@docs
asgraph
asdigraph
```

## Constants

```@docs
SRC
DST
```
87 changes: 87 additions & 0 deletions docs/src/internals/structural_transformation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Structural Transformation

!!! warning "Internal API"
The functions documented on this page are internal implementation details of ModelingToolkit. They are not part of the public API and may change or be removed without notice in non-breaking releases. This documentation is provided to help contributors understand the codebase.

These functions are used for structural analysis and transformation of equation systems, including index reduction, tearing, and other algebraic manipulations used in the simplification process.

## Tearing and Algebraic Simplification

```@docs
tearing
tearing_reassemble
tearing_substitution
torn_system_jacobian_sparsity
find_solvables!
linear_subsys_adjmat!
```

## Index Reduction

```@docs
dae_index_lowering
pantelides!
pantelides_reassemble
dummy_derivative
```

## Consistency Checking

```@docs
check_consistency
```

## Incidence Matrix Operations

```@docs
sorted_incidence_matrix
but_ordered_incidence
```

## Variable Ordering and Masks

```@docs
lowest_order_variable_mask
highest_order_variable_mask
computed_highest_diff_variables
```

## Shift Operations

These functions handle shift operations in discrete-time systems.

```@docs
shift2term
lower_shift_varname
simplify_shifts
distribute_shift
```

## System Structure Types and Functions

```@docs
SystemStructure
TearingState
TransformationState
isdiffvar
isdervar
isalgvar
isdiffeq
algeqs
is_only_discrete
dervars_range
diffvars_range
algvars_range
get_fullvars
system_subset
```

## Graph Types

```@docs
Matching
InducedCondensationGraph
MatchedCondensationGraph
Unassigned
unassigned
```
Loading