# importing modules import sys as sys import os import numpy # Getting the name of the directory where this file is present. current = os.path.dirname(os.path.realpath(__file__)) # src # Getting the parent directory name where the current directory is present. parent = os.path.dirname(current) # Simulation # Getting the grandparent directory name gparent = os.path.dirname(parent) # RecruitmentSynchronization_SMCs # The path where the simExp.py is saved mpath = gparent + '\\cellLib\\Scripts' # appending a path sys.path.append(mpath) import simExp # The simulation .sedml file simfile = gparent+'\\Experiments\\MWC_10_test.sedml' # Set the parameters for simulation start, ending, pointInterval = 0, 400, 0.01 savefiles=[parent+'\\simulatedData\\simFig11_r827_n40'] indexStart = int(200/pointInterval) indexEnd = int(ending/pointInterval) + 1 varSet = {'clamp_para/t_act':{'constants':100},'free_para_10/K':{'constants':6},'free_para_10/k_L':{'constants':0.002} ,'free_para_10/k_Lminus':{'constants':900},'free_para_10/V0':{'constants':-40}} varLoop = {'clamp_para/V_actTest':{'constants':numpy.array([-40])}} varSave = {'t':{'voi':False},'output_10/dQ':{'algebraic':False},'output_10/P_o':{'algebraic':False},'output_10/Q':{'algebraic':False}} simExp.simExp(simfile, savefiles,start, ending, pointInterval,indexStart,indexEnd,varSet,varLoop,varSave) savefiles=[parent+'\\simulatedData\\simFig11_r827_n26'] varLoop = {'clamp_para/V_actTest':{'constants':numpy.array([-26])}} simExp.simExp(simfile, savefiles,start, ending, pointInterval,indexStart,indexEnd,varSet,varLoop,varSave) varLoop = {'clamp_para/V_actTest':{'constants':numpy.array((range(-90, 31, 1)))}} savefiles=[parent+'\\simulatedData\\simFig11_r827'] varSave = {'clamp_para/V_actTest':{'constants':True},'output_10/P_o':{'algebraic':True},'output_10/Q':{'algebraic':True},'output_10/P_ss':{'algebraic':True},'output_10/Q_ss':{'algebraic':True}} simExp.simExp(simfile, savefiles,start, ending, pointInterval,indexStart,indexEnd,varSet,varLoop,varSave) savefiles=[parent+'\\simulatedData\\simFig11_p827_n63'] indexStart = int(200/pointInterval) indexEnd = int(ending/pointInterval) + 1 varSet = {'clamp_para/t_act':{'constants':100},'free_para_10/K':{'constants':6},'free_para_10/k_L':{'constants':0.006} ,'free_para_10/k_Lminus':{'constants':300},'free_para_10/V0':{'constants':-40}} varLoop = {'clamp_para/V_actTest':{'constants':numpy.array([-63])}} varSave = {'t':{'voi':False},'output_10/dQ':{'algebraic':False},'output_10/P_o':{'algebraic':False},'output_10/Q':{'algebraic':False}} simExp.simExp(simfile, savefiles,start, ending, pointInterval,indexStart,indexEnd,varSet,varLoop,varSave) savefiles=[parent+'\\simulatedData\\simFig11_p827_n49'] varLoop = {'clamp_para/V_actTest':{'constants':numpy.array([-49])}} simExp.simExp(simfile, savefiles,start, ending, pointInterval,indexStart,indexEnd,varSet,varLoop,varSave) varLoop = {'clamp_para/V_actTest':{'constants':numpy.array((range(-90, 31, 1)))}} savefiles=[parent+'\\simulatedData\\simFig11_p827'] varSave = {'clamp_para/V_actTest':{'constants':True},'output_10/P_o':{'algebraic':True},'output_10/Q':{'algebraic':True},'output_10/P_ss':{'algebraic':True},'output_10/Q_ss':{'algebraic':True}} simExp.simExp(simfile, savefiles,start, ending, pointInterval,indexStart,indexEnd,varSet,varLoop,varSave)