![]() ![]() BRAHMS
User Guide » Developing Processes » Quick Start » 1199 » Taking Parameters
This documentation is offline - click here to go online
Index | Search: Go online to use Search
| ||
OverviewThe Process you've created doesn't take any parameters, so we can't control how it behaves on any particular execution. Let's add a parameter or two, and then we'll have a process that's beginning to look useful. Passing parametersModify your test script as follows, to pass a couple of parameters to the process. M Source Code (against 995)
% add process
state
state state fS You can go ahead and run this immediately, without modifying your process. Nothing will be different - the process has been presented these parameters, but it has ignored them, and this is quite acceptable in BRAHMS. Reading parametersNow modify your source file to actually read these parameters, which must be done in EVENT_STATE_SET, since your parameters are only made available to you during this C++ Source Code (against 1199)
Then the code to read them both... C++ Source Code (against 1199)
// initialise our internal state currentMembranePotential
// get our parameters currentMembranePotential tau And finally a modification to use the passed value of C++ Source Code (against 1199)
// run dynamics
DOUBLE fS DOUBLE lambda This should produce a plot like the following. Note that both the initial membrane potential, and the time constant of the decay, are now respecting the values we set in the test script. ![]() Where do I go from here?You can parametrize your process as much as you like, and pass in any Matlab structure of parameters. Here, we've seen only a couple of Using 1199, you will probably explore your parameters through the |
||
This is a documentation page for the BRAHMS Modular Execution (Simulation) Framework. For details of licensing and distribution, please click here. To advise of an error or omission, please click here. |