diff --git a/docs/pages.jl b/docs/pages.jl index e280834cfe..793b698f55 100644 --- a/docs/pages.jl +++ b/docs/pages.jl @@ -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"] ] diff --git a/docs/src/API/System.md b/docs/src/API/System.md index c7cf3cdd9b..b6c16ec730 100644 --- a/docs/src/API/System.md +++ b/docs/src/API/System.md @@ -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 +``` diff --git a/docs/src/internals.md b/docs/src/internals.md index 409ca51571..5b04714e8f 100644 --- a/docs/src/internals.md +++ b/docs/src/internals.md @@ -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. diff --git a/docs/src/internals/bipartite_graph.md b/docs/src/internals/bipartite_graph.md new file mode 100644 index 0000000000..8e2487c06a --- /dev/null +++ b/docs/src/internals/bipartite_graph.md @@ -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 +``` \ No newline at end of file diff --git a/docs/src/internals/structural_transformation.md b/docs/src/internals/structural_transformation.md new file mode 100644 index 0000000000..e2a3a2a854 --- /dev/null +++ b/docs/src/internals/structural_transformation.md @@ -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 +``` \ No newline at end of file