Skip to content

Commit ae14ed6

Browse files
Merge pull request #3379 from vyudu/ss_discrete
Renaming discrete variables during structural simplification (plus refactoring `tearing_reassemble`)
2 parents 1d38bb1 + 4e7e1f6 commit ae14ed6

File tree

9 files changed

+602
-285
lines changed

9 files changed

+602
-285
lines changed

src/structural_transformation/StructuralTransformations.jl

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ using SymbolicUtils: maketerm, iscall
1111

1212
using ModelingToolkit
1313
using ModelingToolkit: ODESystem, AbstractSystem, var_from_nested_derivative, Differential,
14-
unknowns, equations, vars, Symbolic, diff2term_with_unit, value,
14+
unknowns, equations, vars, Symbolic, diff2term_with_unit,
15+
shift2term_with_unit, value,
1516
operation, arguments, Sym, Term, simplify, symbolic_linear_solve,
1617
isdiffeq, isdifferential, isirreducible,
1718
empty_substitutions, get_substitutions,
@@ -22,7 +23,8 @@ using ModelingToolkit: ODESystem, AbstractSystem, var_from_nested_derivative, Di
2223
get_postprocess_fbody, vars!,
2324
IncrementalCycleTracker, add_edge_checked!, topological_sort,
2425
invalidate_cache!, Substitutions, get_or_construct_tearing_state,
25-
filter_kwargs, lower_varname_with_unit, setio, SparseMatrixCLIL,
26+
filter_kwargs, lower_varname_with_unit,
27+
lower_shift_varname_with_unit, setio, SparseMatrixCLIL,
2628
get_fullvars, has_equations, observed,
2729
Schedule, schedule
2830

@@ -63,6 +65,7 @@ export torn_system_jacobian_sparsity
6365
export full_equations
6466
export but_ordered_incidence, lowest_order_variable_mask, highest_order_variable_mask
6567
export computed_highest_diff_variables
68+
export shift2term, lower_shift_varname
6669

6770
include("utils.jl")
6871
include("pantelides.jl")

0 commit comments

Comments
 (0)