|
34 | 34 | import org.jlibsedml.ComputeChange;
|
35 | 35 | import org.jlibsedml.Curve;
|
36 | 36 | import org.jlibsedml.DataGenerator;
|
| 37 | +import org.jlibsedml.DataSet; |
37 | 38 | import org.jlibsedml.Libsedml;
|
38 | 39 | import org.jlibsedml.Model;
|
39 | 40 | import org.jlibsedml.Notes;
|
40 | 41 | import org.jlibsedml.Parameter;
|
41 | 42 | import org.jlibsedml.Plot2D;
|
42 | 43 | import org.jlibsedml.Range;
|
43 | 44 | import org.jlibsedml.RepeatedTask;
|
| 45 | +import org.jlibsedml.Report; |
44 | 46 | import org.jlibsedml.SEDMLDocument;
|
45 | 47 | import org.jlibsedml.SEDMLTags;
|
46 | 48 | import org.jlibsedml.SedML;
|
@@ -739,22 +741,35 @@ private void translateBioModelToSedML(String savePath) {
|
739 | 741 |
|
740 | 742 | if (!bSimHasHistogram) {
|
741 | 743 | String plot2dId = "plot2d_" + TokenMangler.mangleToSName(vcSimulation.getName());
|
| 744 | + String reportId = "report_" + TokenMangler.mangleToSName(vcSimulation.getName()); |
742 | 745 | Plot2D sedmlPlot2d = new Plot2D(plot2dId, simContext.getName() + "plots");
|
| 746 | + Report sedmlReport = new Report(reportId, simContext.getName() + "report"); |
| 747 | + |
743 | 748 | sedmlPlot2d.addNote(createNotesElement("Plot of all variables and output functions from application '" + simContext.getName() + "' ; simulation '" + vcSimulation.getName() + "' in VCell model"));
|
744 |
| - List<DataGenerator> dataGenerators = sedmlModel.getDataGenerators(); |
| 749 | + sedmlReport.addNote(createNotesElement("Report of all variables and output functions from application '" + simContext.getName() + "' ; simulation '" + vcSimulation.getName() + "' in VCell model")); |
| 750 | +// List<DataGenerator> dataGenerators = sedmlModel.getDataGenerators(); |
745 | 751 | String xDataRef = sedmlModel.getDataGeneratorWithId(DATAGENERATOR_TIME_NAME + "_" + taskRef).getId();
|
| 752 | + String xDatasetXId = "datasetX_" + DATAGENERATOR_TIME_NAME; |
| 753 | + DataSet dataSet = new DataSet(xDatasetXId, xDatasetXId, xDataRef, xDataRef); |
| 754 | + sedmlReport.addDataSet(dataSet); |
| 755 | + |
746 | 756 | // add a curve for each dataGenerator in SEDML model
|
747 | 757 | int curveCnt = 0;
|
748 | 758 | for (DataGenerator dataGenerator : dataGeneratorsOfSim) {
|
749 | 759 | // no curve for time, since time is xDateReference
|
750 | 760 | if (dataGenerator.getId().equals(xDataRef)) {
|
751 | 761 | continue;
|
752 | 762 | }
|
753 |
| - String curveId = "curve_" + curveCnt++; |
| 763 | + String curveId = "curve_" + curveCnt; |
| 764 | + String datasetYId = "datasetY_" + curveCnt; |
754 | 765 | Curve curve = new Curve(curveId, curveId, false, false, xDataRef, dataGenerator.getId());
|
755 | 766 | sedmlPlot2d.addCurve(curve);
|
| 767 | + DataSet yDataSet = new DataSet(datasetYId, datasetYId, dataGenerator.getId(), dataGenerator.getId()); |
| 768 | + sedmlReport.addDataSet(yDataSet); |
| 769 | + curveCnt++; |
756 | 770 | }
|
757 | 771 | sedmlModel.addOutput(sedmlPlot2d);
|
| 772 | + sedmlModel.addOutput(sedmlReport); |
758 | 773 | }
|
759 | 774 | }
|
760 | 775 | } // end - for 'sims'
|
|
0 commit comments