<jupyter_start><jupyter_text>System object attributes<jupyter_code># Create symbolic objects
x, f, P = system.load_ODE_model(2, 2)
f[0] = -x[0]**2 + P[0]*x[1]
f[1] = -P[1]*x[1]
print('The states : {0}'.format(x))
print('The dynamics f : {0}'.format(f))
print('The dynamics P : {0}'.format(P))
C = np.array([[0,1]]).tolist()
# System class
sys = System(x, f, params = P, C = C)<jupyter_output><empty_output><jupyter_text>Solve the System using the ODE subclass<jupyter_code># Solve ODE from System
from autoreduce.ode import ODE
timepoints = np.linspace(0,20,100)
sys.params_values = [2, 4]
sys.x_init = [0,10]
sys_ode = ODE(sys.x, sys.f, params = sys.params, params_values = sys.params_values,
              C = sys.C, x_init = sys.x_init, timepoints = timepoints)
solution = sys_ode.solve_system()<jupyter_output><empty_output><jupyter_text>Local sensitivity analysis tools for System using the SSM subclass<jupyter_code># Solve for sensitivity analysis from System
from autoreduce.local_sensitivity import SSM
timepoints = np.linspace(0,20,10)
sys.params_values = [2, 4]
sys.x_init = [0,10]
sys_ssm = SSM(sys.x, sys.f, params = sys.params, params_values = sys.params_values,
              C = sys.C, x_init = sys.x_init, timepoints = timepoints)
solution = sys_ssm.compute_SSM()
J = sys_ssm.compute_J([2,1])
Z = sys_ssm.compute_Zj([2,1], 1)
print('J = ',J)
print('Z = ', Z)
print('SSM = ',solution)<jupyter_output>J =  [[-2.06  1.  ]
 [ 0.   -2.  ]]
Z =  [ 0.  -0.5]
SSM =  [[[ 0.00000000e+00  0.00000000e+00]
  [ 0.00000000e+00  0.00000000e+00]]

 [[ 1.34336602e-01  4.36756653e-16]
  [-5.45133802e-02 -3.89180870e-02]]

 [[ 1.59522028e-01  7.92846941e-16]
  [-7.25396519e-02 -2.31604933e-02]]

 [[ 1.69993653e-01  0.00000000e+00]
  [-7.99571192e-02 -1.64071877e-02]]

 [[ 1.75732041e-01  4.04531915e-15]
  [-8.39924423e-02 -1.27021957e-02]]

 [[ 6.69479923e-05 -5.42042053e-18]
  [-3.34739922e-05 -3.44782135e-04]]

 [[ 2.63589968e-10  2.12945088e-25]
  [-1.26852669e-10 -9.88465598e-12]]

 [[-2.70825328e-09  6.86216667e-23]
  [ 1.31060111e-09  8.70510624e-11]]

 [[ 4.10298779e-08 -2.10396602e-20]
  [-1.99379559e-08 -1.15396610e-09]]

 [[ 9.43881841e-09  2.35504663e-23]
  [-4.60142374e-09 -2.35970617e-10]]]<jupyter_text>Use Reduce class to perform model reduction of System<jupyter_code>from autoreduce.model_reduction import Reduce
timepoints_ode = np.linspace(0,20,100)
timepoints_ssm = np.linspace(0,20,10)
sys_reduce = Reduce(sys.x, sys.f, params = sys.params, params_values = sys.params_values,
        C = sys.C, x_init = sys.x_init, 
       timepoints_ode = timepoints_ode, timepoints_ssm = timepoints_ssm,)

all_combinations = sys_reduce.get_all_combinations()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16697451052826007, 'fraction_numerical': 0.18507572958995197, 'mean_word_length': 4.207692307692308, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 5, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '292002', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1488, 'n_tokens_neox': 1199, 'n_words': 206, 'path': 'tests/Objects tests in auto-reduce.ipynb', 'repo_name': 'ayush9pandey/sbmlReduce', 'size': '2707'}