analog_ports_expressions = {} # Load the Component: nineml_comp = TestableComponent('hierachical_iaf_1coba')() if not nineml_comp: raise RuntimeError('Cannot load NineML component') # Create Log, Solver, DataReporter and Simulation object log = daeBaseLog() daesolver = daeIDAS() #from daetools.solvers import pySuperLU as superlu #lasolver = superlu.daeCreateSuperLUSolver() #daesolver.SetLASolver(lasolver) model = nineml_daetools_bridge(nineml_comp.name, nineml_comp, None, '') simulation = nineml_daetools_simulation( model, timeHorizon=timeHorizon, reportingInterval=reportingInterval, parameters=parameters, initial_conditions=initial_conditions, active_regimes=active_regimes, analog_ports_expressions=analog_ports_expressions, event_ports_expressions=event_ports_expressions, variables_to_report=variables_to_report, random_number_generators={}) datareporter = ninemlTesterDataReporter() # Set the time horizon and the reporting interval simulation.ReportingInterval = reportingInterval
simulation_data.timeHorizon = inputs['timeHorizon'] simulation_data.reportingInterval = inputs['reportingInterval'] simulation_data.parameters = inputs['parameters'] simulation_data.initial_conditions = inputs['initial_conditions'] simulation_data.active_regimes = inputs['active_regimes'] simulation_data.analog_ports_expressions = inputs['analog_ports_expressions'] simulation_data.event_ports_expressions = inputs['event_ports_expressions'] simulation_data.variables_to_report = inputs['variables_to_report'] parser = createExpressionParser() # Create Log, DAESolver, DataReporter and Simulation object log = daePythonStdOutLog() daesolver = daeIDAS() datareporter = ninemlTesterDataReporter() # daeTCPIPDataReporter() model = nineml_daetools_bridge(inspector.ninemlComponent.name, inspector.ninemlComponent, None, '') simulation = nineml_daetools_simulation(model, timeHorizon = simulation_data.timeHorizon, reportingInterval = simulation_data.reportingInterval, parameters = simulation_data.parameters, initial_conditions = simulation_data.initial_conditions, active_regimes = simulation_data.active_regimes, analog_ports_expressions = simulation_data.analog_ports_expressions, event_ports_expressions = simulation_data.event_ports_expressions, variables_to_report = simulation_data.variables_to_report) # Set the time horizon and the reporting interval simulation.ReportingInterval = simulation_data.reportingInterval simulation.TimeHorizon = simulation_data.timeHorizon # Connect data reporter
analog_ports_expressions = {} # Load the Component: nineml_comp = TestableComponent('hierachical_iaf_1coba')() if not nineml_comp: raise RuntimeError('Cannot load NineML component') # Create Log, Solver, DataReporter and Simulation object log = daeBaseLog() daesolver = daeIDAS() #from daetools.solvers import pySuperLU as superlu #lasolver = superlu.daeCreateSuperLUSolver() #daesolver.SetLASolver(lasolver) model = nineml_daetools_bridge(nineml_comp.name, nineml_comp, None, '') simulation = nineml_daetools_simulation(model, timeHorizon = timeHorizon, reportingInterval = reportingInterval, parameters = parameters, initial_conditions = initial_conditions, active_regimes = active_regimes, analog_ports_expressions = analog_ports_expressions, event_ports_expressions = event_ports_expressions, variables_to_report = variables_to_report, random_number_generators = {} ) datareporter = ninemlTesterDataReporter() # Set the time horizon and the reporting interval simulation.ReportingInterval = reportingInterval simulation.TimeHorizon = timeHorizon
simulation_data.parameters = inputs['parameters'] simulation_data.initial_conditions = inputs['initial_conditions'] simulation_data.active_regimes = inputs['active_regimes'] simulation_data.analog_ports_expressions = inputs[ 'analog_ports_expressions'] simulation_data.event_ports_expressions = inputs[ 'event_ports_expressions'] simulation_data.variables_to_report = inputs['variables_to_report'] parser = createExpressionParser() # Create Log, DAESolver, DataReporter and Simulation object log = daePythonStdOutLog() daesolver = daeIDAS() datareporter = ninemlTesterDataReporter() # daeTCPIPDataReporter() model = nineml_daetools_bridge(inspector.ninemlComponent.name, inspector.ninemlComponent, None, '') simulation = nineml_daetools_simulation( model, timeHorizon=simulation_data.timeHorizon, reportingInterval=simulation_data.reportingInterval, parameters=simulation_data.parameters, initial_conditions=simulation_data.initial_conditions, active_regimes=simulation_data.active_regimes, analog_ports_expressions=simulation_data. analog_ports_expressions, event_ports_expressions=simulation_data. event_ports_expressions, variables_to_report=simulation_data.variables_to_report) # Set the time horizon and the reporting interval