From: Richard A. <ric...@ed...> - 2012-02-07 23:52:50
|
I agree with Jonathan on this - if a nested simulation can handle a uniform time course, by specifying the range to use 'time' as a target, why not go the whole hog and get rid of UniformTimeCourse? The concept in l1v1 of a task relating a simulation and a model, while elegant, seems rather obsolete by this proposal. The advantages of being able to define simulations independently of a model seem outweighed by the benefits of using Frank's primitive-based approach, to my mind. Since the nestedSimulation can use XPath to identify the model variables that will be altered , it is already tied to a model - so perhaps it could use a model reference directly, rather than relating to a model via a Task. How about renaming nestedSimulation to 'simulationTask'. A base simulationTask can then refer to a model, or to another simulationTask - ultimately this will lead to a 'base task' that will point to a model element. Here is an example of what I mean based on Frank's 1D parameter scan example: Note that a) UniformTimeCourse is replaced by a simulationTask. b) 'Tasks' are removed altogether. c) A simulation task can refer to another task ('originalTask') or a model. d) Variables in DataGenerators now refer to simulationTasks rather than 'Tasks'. In a nested set of simulationTasks, the outermost one should always refer to a SED-ML model element. <?xml version="1.0" encoding="utf-8"?> <sedML level="1" version="1" xmlns="http://sed-ml.org/"> <listOfSimulationTasks> <simulationTask id="utc" resetModel="false" model="model1" range="timestep"> <algorithm kisaoID="KISAO:0000019" /> <ranges> <uniformRange id="timestep" start="0" end="20" numberOfPoints="1000" /> </ranges> <changes> <setValue target="urn:sedml:symbol:time" range="timestep"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <ci> timeStep </ci> </math> </setValue> </changes> </simulationTask> <simulationTask id="nested1" resetModel="true" originalTask="utc" range="current"> <ranges> <vectorRange id="current"> <value>8</value> <value>4</value> <value>0.4</value> </vectorRange> </ranges> <changes> <setValue target="/sbml:sbml/sbml:model/sbml:listOfParameters/ sbml:parameter[@id='J0_v0']" range="current"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <ci> current </ci> </math> </setValue> </changes> </simulationTask> </listOfSimulationTasks> <listOfModels> <model id="model1" language="urn:sedml:language:sbml" source="http://libsedml.svn.sourceforge.net/viewvc/libsedml/trunk/Samples/models/oscli.xml " /> </listOfModels> <listOfDataGenerators> <dataGenerator id="time1" name="time"> <listOfVariables> <variable id="time" name="time" taskReference="nested1" target="time" /> </listOfVariables> <math xmlns="http://www.w3.org/1998/Math/MathML"> <ci> time </ci> </math> </dataGenerator> <dataGenerator id="J0_v0_1" name="J0_v0"> <listOfVariables> <variable id="J0_v0" name="J0_v0" taskReference="nested1" target="/sbml:sbml/sbml:model/sbml:listOfParameters/ sbml:parameter[@id='J0_v0']" /> </listOfVariables> <math xmlns="http://www.w3.org/1998/Math/MathML"> <ci> J0_v0 </ci> </math> </dataGenerator> <dataGenerator id="S1_1" name="S1"> <listOfVariables> <variable id="S1" name="S1" taskReference="nested1" target="/sbml:sbml/sbml:model/sbml:listOfSpecies/ sbml:species[@id='S1']" /> </listOfVariables> <math xmlns="http://www.w3.org/1998/Math/MathML"> <ci> S1 </ci> </math> </dataGenerator> <dataGenerator id="S2_1" name="S2"> <listOfVariables> <variable id="S2" name="S2" taskReference="nested1" target="/sbml:sbml/sbml:model/sbml:listOfSpecies/ sbml:species[@id='S2']" /> </listOfVariables> <math xmlns="http://www.w3.org/1998/Math/MathML"> <ci> S2 </ci> </math> </dataGenerator> </listOfDataGenerators> <listOfOutputs> <plot2D id="plot1" name="Timecourse (Oscli) (for v0 = 8, 4, 0.4)"> <listOfCurves> <curve id="curve1" logX="false" logY="false" xDataReference="time1" yDataReference="S1_1" /> <curve id="curve2" logX="false" logY="false" xDataReference="time1" yDataReference="S2_1" /> </listOfCurves> </plot2D> </listOfOutputs> </sedML> One other suggestion: in the current nestedSimulations, inner loops are not reusable - they are defined with respect to the outer simulations. How about being able to define 1D parameter scans independently, which could be combined together simply, e.g., <nestedSimulationTask> <simulationTaskRef refid="paramscan1"/> <simulationTaskRef refid="paramscan2"/> </nestedSimulationTask> indicating a combination of two tasks to produce a 2D scan? I.e., each task is defined 'one-dimensionally' but can be composed into N- dimensional simulations by linear combination. Finally one other benefit of the nested simulation approach in general, to include in the proposal ( I think it's been mentioned in discussions) is that it will no longer be necessary to use SBML Events to encode time dependent changes to parameters in SBML - a vector range of time values. This will be really useful to reduce the pollution of model databases with structurally identical models differing only in runtime setup. Cheers Richard On 7 Feb 2012, at 11:43, Jonathan Cooper wrote: > Hi Frank & everyone, > > I'm afraid I've not properly read the most recent emails on this > thread > yet, as I've been away on holiday. However I made some notes on the > proposal on my journey out which hopefully will be useful, so I'm > sending them now, and will go through the discussion later this week > hopefully. > > On the topic of nesting tasks (rather than simulations) - I think this > does make more sense, as the nesting references a task, and this > shouldn't be done from a simulation. Also you need to change model > variables when looping, so need the model reference that a task gives > you. It'd be nice to have some more flesh on the ideas in Nicolas' > second email on this sub-topic. > > This approach has the potential advantage that a nested task wouldn't > have/need an algorithm element. However, tasks have a modelReference > which also seems redundant. What would happen if the reference task > referenced a different model? Could the modelReference be disallowed > for > this subclass? (The hierarchy would need tweaking a little to do > this.) > > > I have a few other queries/suggestions on the proposal. > > 1) I think it should be possible to use the nested features to > specify a > timecourse simulations. This isn't obvious or neat at present, which > suggests that improvement should be possible. > > For instance, oneStep currently specifies the step value, but this > would > more naturally live in a range on the nested task (and would avoid > having to make it optional to account for steady-state). So perhaps a > better approach is to move towards parameterised simulation > entities, so > that (analogous to setting a model variable) you can set a parameter > on > a simulation object? This could link quite nicely with the > algorithmParameter proposal for specifying simulation parameters. Then > you could, for instance, set the "end time" for a oneStep of an ODE > solver. > > For specifying the target of such a set, I don't really like the > idea of > XPath into the SED-ML document - it just looks ugly to me. Since we > already have globally unique IDs within SED-ML, using those seems > tidier. > > 2) It's not clear in the current proposal whether changes are > applied at > the start or end of each iteration; I assume (and suggest) start. It > would also be nice to be able to apply a change at the start/end of a > whole nested simulation/task. > > 3) Passing in range values. The various suggestions in the proposal > all > seem a little clunky. Since ranges have globally unique IDs, could we > make all ranges in the simulation/task implicitly accessible using > this > ID as a variable name? Since the ID space is shared across all object > types, it can't conflict with a variable or parameter. The same > feature > could be used to avoid needing an index attribute in a > functionalRange, > and would make it easier to combine multiple ranges in other ways (a > functionalRange could sum 2 ranges, for instance, or different > variables > could be set based on different ranges). > > Best wishes, > Jonathan > > On 19/01/2012 07:17, Frank T. Bergmann wrote: >> Hello, >> >> As many of you know early in 2010 I proposed a simple nested >> simulation >> experiment for SED-ML. Of course that was well before the SED-ML >> spec was >> released. Since then I listened to your feedback and made >> adjustments. With >> the start of the new year it is time to get the Nested Simulation >> Proposal >> for SED-ML ready for wide-spread adoption. I believe nested >> simulations are >> vital for SED-ML so that we can cover a much larger variety of >> simulation >> experiments. >> >> I've taken these past weeks to fully flesh out all the details and >> the >> document is now available from Nature Proceedings: >> >> http://precedings.nature.com/documents/4257/version/2 >> >> Unlike the last version this time there is a full description of each >> element along with examples. If you only have a couple of seconds, >> have a >> look at my blog where you see the examples: >> >> http://frank-fbergmann.blogspot.com/2012/01/sed-ml-nested-simulation-proposa >> l-v2.html >> >> Or try the SED-ML Web Tools, that I updated to be able to simulate >> the >> nested experiment: >> >> http://sysbioapps.dyndns.org/SED-ML_Web_Tools/ >> >> I look forward to your feedback! >> >> >> Best >> Frank >> >> >> ------------------------------------------------------------------------------ >> Keep Your Developer Skills Current with LearnDevNow! >> The most comprehensive online learning library for Microsoft >> developers >> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, >> MVC3, >> Metro Style Apps, more. Free future releases when you subscribe now! >> http://p.sf.net/sfu/learndevnow-d2d >> _______________________________________________ >> SED-ML-discuss mailing list >> SED...@li... >> https://lists.sourceforge.net/lists/listinfo/sed-ml-discuss > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft > developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, > MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > SED-ML-discuss mailing list > SED...@li... > https://lists.sourceforge.net/lists/listinfo/sed-ml-discuss > Dr Richard Adams Centre For Systems Biology Edinburgh University of Edinburgh Tel: 0131 651 9019 email : ric...@ed... Web: http://csbe.bio.ed.ac.uk/adams.php *** Places available on CSBE modelling course April 2012 *** see http://www.csbe.ed.ac.uk/news-events/event/course-details -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. |