@@ -352,8 +352,9 @@ function SymbolicIndexingInterface.is_variable(sys::AbstractSystem, sym)
352
352
return sym in 1 : length (variable_symbols (sys))
353
353
end
354
354
if has_index_cache (sys) && (ic = get_index_cache (sys)) != = nothing
355
- return is_variable (ic, sym) || istree (sym) && operation (sym) === getindex &&
356
- is_variable (ic, first (arguments (sym)))
355
+ return is_variable (ic, sym) ||
356
+ istree (sym) && operation (sym) === getindex &&
357
+ is_variable (ic, first (arguments (sym)))
357
358
end
358
359
return any (isequal (sym), variable_symbols (sys)) ||
359
360
hasname (sym) && is_variable (sys, getname (sym))
@@ -379,8 +380,8 @@ function SymbolicIndexingInterface.variable_index(sys::AbstractSystem, sym)
379
380
return if (idx = variable_index (ic, sym)) != = nothing
380
381
idx
381
382
elseif istree (sym) && operation (sym) === getindex &&
382
- (idx = variable_index (ic, first (arguments (sym)))) != = nothing
383
- idx[arguments (sym)[begin + 1 : end ]. .. ]
383
+ (idx = variable_index (ic, first (arguments (sym)))) != = nothing
384
+ idx[arguments (sym)[( begin + 1 ) : end ]. .. ]
384
385
else
385
386
nothing
386
387
end
415
416
function SymbolicIndexingInterface. is_parameter (sys:: AbstractSystem , sym)
416
417
sym = unwrap (sym)
417
418
if has_index_cache (sys) && (ic = get_index_cache (sys)) != = nothing
418
- return is_parameter (ic, sym) || istree (sym) && operation (sym) === getindex &&
419
- is_parameter (ic, first (arguments (sym)))
419
+ return is_parameter (ic, sym) ||
420
+ istree (sym) && operation (sym) === getindex &&
421
+ is_parameter (ic, first (arguments (sym)))
420
422
end
421
423
if unwrap (sym) isa Int
422
424
return unwrap (sym) in 1 : length (parameter_symbols (sys))
@@ -441,8 +443,8 @@ function SymbolicIndexingInterface.parameter_index(sys::AbstractSystem, sym)
441
443
return if (idx = parameter_index (ic, sym)) != = nothing
442
444
idx
443
445
elseif istree (sym) && operation (sym) === getindex &&
444
- (idx = parameter_index (ic, first (arguments (sym)))) != = nothing
445
- ParameterIndex (idx. portion, (idx. idx... , arguments (sym)[begin + 1 : end ]. .. ))
446
+ (idx = parameter_index (ic, first (arguments (sym)))) != = nothing
447
+ ParameterIndex (idx. portion, (idx. idx... , arguments (sym)[( begin + 1 ) : end ]. .. ))
446
448
else
447
449
nothing
448
450
end
@@ -1701,7 +1703,6 @@ function linearization_function(sys::AbstractSystem, inputs,
1701
1703
u0, _p, _ = get_u0_p (sys, x0, p; use_union = false , tofloat = true )
1702
1704
ps = parameters (sys)
1703
1705
if has_index_cache (sys) && get_index_cache (sys) != = nothing
1704
- @show p full_parameters (sys)
1705
1706
p = MTKParameters (sys, p)
1706
1707
else
1707
1708
p = _p
0 commit comments