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

Renaming discrete variables during structural simplification (plus refactoring tearing_reassemble) #3379

Merged
merged 46 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
76e515c
Init
vyudu Jan 23, 2025
f1d2a07
rename
vyudu Jan 24, 2025
2bd65e2
up
vyudu Jan 24, 2025
d9a760d
Merge remote-tracking branch 'origin' into implicit_discrete_system
vyudu Jan 29, 2025
4142923
up
vyudu Jan 29, 2025
afc4689
add test file
vyudu Jan 30, 2025
397298f
working on structural simplification
vyudu Jan 30, 2025
be1b270
change variable renaming
vyudu Jan 30, 2025
cc23c88
up
vyudu Jan 30, 2025
f5e5aff
revert all
vyudu Jan 30, 2025
b530595
working simplification
vyudu Feb 3, 2025
fe37286
solving equations
vyudu Feb 3, 2025
dd71d23
add docs
vyudu Feb 4, 2025
4475a5a
up
vyudu Feb 4, 2025
a964dd7
up
vyudu Feb 4, 2025
b1795bd
Merge remote-tracking branch 'origin' into ss_discrete
vyudu Feb 4, 2025
26a545d
up
vyudu Feb 4, 2025
1656277
maadd comments
vyudu Feb 4, 2025
16ea18b
begin refactor
vyudu Feb 4, 2025
bf3cd33
reorganization into functions
vyudu Feb 4, 2025
5a77f43
explicit case
vyudu Feb 6, 2025
91acf91
beginning implicit equation
vyudu Feb 7, 2025
56829f7
up
vyudu Feb 7, 2025
1c578c3
rename functions
vyudu Feb 7, 2025
ed143a5
refactor: refactor tearing_assemble into functions
vyudu Feb 10, 2025
240ab21
fix: properly rename variables inside generate_system_equations
vyudu Feb 10, 2025
22a39bd
delete comments
vyudu Feb 10, 2025
9aaf04a
more cleanup
vyudu Feb 10, 2025
66266e4
better comments
vyudu Feb 11, 2025
c651efe
Merge remote-tracking branch 'origin' into ss_discrete
vyudu Feb 11, 2025
1ab6246
fix unassigned indexing
vyudu Feb 11, 2025
079901b
move D, iv into tearing_reassemble
vyudu Feb 11, 2025
9217c62
refactor iv
vyudu Feb 11, 2025
5491098
fix comment for eq_to_diff
vyudu Feb 11, 2025
37170c5
Merge remote-tracking branch 'origin' into ss_discrete
vyudu Feb 11, 2025
5878ad6
fix total_sub
vyudu Feb 11, 2025
397b279
add diff_to_var as argument for find_dumplicate_dd, fix substitution …
vyudu Feb 12, 2025
bb42719
fix: fix initialization of DiscreteSystem with renamed variables
vyudu Feb 13, 2025
09f31b2
revert runtest
vyudu Feb 13, 2025
daa7898
frefactor use toterm instead of lower_varname
vyudu Feb 14, 2025
ae19eeb
fix unit
vyudu Feb 14, 2025
406d0a8
fix parse error
vyudu Feb 14, 2025
2a97325
feat: initialization of DiscreteSystem
vyudu Feb 18, 2025
fc2a309
fix tests and shift2term
vyudu Feb 19, 2025
f29824e
Format
vyudu Feb 24, 2025
4e7e1f6
Merge remote-tracking branch 'origin' into ss_discrete
vyudu Feb 24, 2025
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
7 changes: 5 additions & 2 deletions src/structural_transformation/StructuralTransformations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ using SymbolicUtils: maketerm, iscall

using ModelingToolkit
using ModelingToolkit: ODESystem, AbstractSystem, var_from_nested_derivative, Differential,
unknowns, equations, vars, Symbolic, diff2term_with_unit, value,
unknowns, equations, vars, Symbolic, diff2term_with_unit,
shift2term_with_unit, value,
operation, arguments, Sym, Term, simplify, symbolic_linear_solve,
isdiffeq, isdifferential, isirreducible,
empty_substitutions, get_substitutions,
Expand All @@ -22,7 +23,8 @@ using ModelingToolkit: ODESystem, AbstractSystem, var_from_nested_derivative, Di
get_postprocess_fbody, vars!,
IncrementalCycleTracker, add_edge_checked!, topological_sort,
invalidate_cache!, Substitutions, get_or_construct_tearing_state,
filter_kwargs, lower_varname_with_unit, setio, SparseMatrixCLIL,
filter_kwargs, lower_varname_with_unit,
lower_shift_varname_with_unit, setio, SparseMatrixCLIL,
get_fullvars, has_equations, observed,
Schedule, schedule

Expand Down Expand Up @@ -63,6 +65,7 @@ export torn_system_jacobian_sparsity
export full_equations
export but_ordered_incidence, lowest_order_variable_mask, highest_order_variable_mask
export computed_highest_diff_variables
export shift2term, lower_shift_varname

include("utils.jl")
include("pantelides.jl")
Expand Down
Loading
Loading