99#include " amici/vector.h"
1010
1111#include < vector>
12+ #include < span>
13+ #include < string_view>
1214
1315namespace amici {
1416class ReturnData ;
@@ -28,7 +30,7 @@ void serialize(Archive& ar, amici::ReturnData& r, unsigned int version);
2830namespace amici {
2931
3032/* *
31- * @brief Stores all data to be returned by amici::runAmiciSimulation .
33+ * @brief Stores all data to be returned by amici::run_simulation .
3234 *
3335 * NOTE: multi-dimensional arrays are stored in row-major order (C-style)
3436 */
@@ -57,14 +59,38 @@ class ReturnData : public ModelDimensions {
5759 * @param sigma_res_ indicates whether additional residuals are to be added
5860 * for each sigma
5961 * @param sigma_offset_ offset to ensure real-valuedness of sigma residuals
62+ * @param free_parameter_ids_ IDs of the free parameters
63+ * @param free_parameter_names_ Names of the free parameters
64+ * @param fixed_parameter_ids_ IDs of the fixed parameters
65+ * @param fixed_parameter_names_ Names of the fixed parameters
66+ * @param state_ids_ IDs of state variables
67+ * @param state_names_ Names of state variables
68+ * @param state_ids_solver_ IDs of solver state variables
69+ * @param state_names_solver_ Names of solver state variables
70+ * @param observable_ids_ IDs of observables
71+ * @param observable_names_ Names of observables
72+ * @param expression_ids_ IDs of expressions
73+ * @param expression_names_ Names of expressions
6074 */
6175 ReturnData (
6276 std::vector<realtype> ts_, ModelDimensions const & model_dimensions_,
6377 int nmaxevent_, int newton_maxsteps_, std::vector<int > plist_,
6478 std::vector<ParameterScaling> pscale_, SecondOrderMode o2mode_,
6579 SensitivityOrder sensi_, SensitivityMethod sensi_meth_,
6680 RDataReporting rdrm_, bool quadratic_llh_, bool sigma_res_,
67- realtype sigma_offset_
81+ realtype sigma_offset_,
82+ std::span<std::string_view const > free_parameter_ids_,
83+ std::span<std::string_view const > free_parameter_names_,
84+ std::span<std::string_view const > fixed_parameter_ids_,
85+ std::span<std::string_view const > fixed_parameter_names_,
86+ std::span<std::string_view const > state_ids_,
87+ std::span<std::string_view const > state_names_,
88+ std::span<std::string_view const > state_ids_solver_,
89+ std::span<std::string_view const > state_names_solver_,
90+ std::span<std::string_view const > observable_ids_,
91+ std::span<std::string_view const > observable_names_,
92+ std::span<std::string_view const > expression_ids_,
93+ std::span<std::string_view const > expression_names_
6894 );
6995
7096 /* *
@@ -112,7 +138,7 @@ class ReturnData : public ModelDimensions {
112138 * (shape `nx_solver` x `nx_solver`, row-major) evaluated at `t_last`.
113139 *
114140 * The corresponding state variable IDs can be obtained from
115- * `Model::getStateIdsSolver ()`.
141+ * `state_ids_solver ()`.
116142 */
117143 std::vector<realtype> J;
118144
@@ -124,7 +150,7 @@ class ReturnData : public ModelDimensions {
124150 * at timepoints `ReturnData::ts` (shape `nt` x `nw`, row major).
125151 *
126152 * The corresponding expression IDs can be obtained from
127- * `Model::getExpressionIds() `.
153+ * `expression_ids `.
128154 */
129155 std::vector<realtype> w;
130156
@@ -171,7 +197,7 @@ class ReturnData : public ModelDimensions {
171197 * (shape `nt` x `nx_rdata`, row-major).
172198 *
173199 * The corresponding state variable IDs can be obtained from
174- * `Model::getStateIds() `.
200+ * `state_ids `.
175201 */
176202 std::vector<realtype> x;
177203
@@ -184,7 +210,7 @@ class ReturnData : public ModelDimensions {
184210 * (shape `nt` x `nplist` x `nx_rdata`, row-major).
185211 *
186212 * The corresponding state variable IDs can be obtained from
187- * `Model::getStateIds() `.
213+ * `state_ids `.
188214 */
189215 std::vector<realtype> sx;
190216
@@ -195,7 +221,7 @@ class ReturnData : public ModelDimensions {
195221 * (shape `nt` x `ny`, row-major).
196222 *
197223 * The corresponding observable IDs can be obtained from
198- * `Model::getObservableIds() `.
224+ * `observable_ids `.
199225 */
200226 std::vector<realtype> y;
201227
@@ -211,7 +237,7 @@ class ReturnData : public ModelDimensions {
211237 * (shape `nt` x `nplist` x `ny`, row-major).
212238 *
213239 * The corresponding observable IDs can be obtained from
214- * `Model::getObservableIds() `.
240+ * `observable_ids `.
215241 */
216242 std::vector<realtype> sy;
217243
@@ -412,7 +438,7 @@ class ReturnData : public ModelDimensions {
412438 * @brief Initial state of the main simulation (shape `nx_rdata`).
413439 *
414440 * The corresponding state variable IDs can be obtained from
415- * `Model::getStateIds() `.
441+ * `state_ids `.
416442 */
417443 std::vector<realtype> x0;
418444
@@ -422,7 +448,7 @@ class ReturnData : public ModelDimensions {
422448 * The values of the state variables at the pre-equilibration steady state
423449 * (shape `nx_rdata`).
424450 * The corresponding state variable IDs can be obtained from
425- * `Model::getStateIds() `.
451+ * `state_ids `.
426452 */
427453 std::vector<realtype> x_ss;
428454
@@ -526,10 +552,46 @@ class ReturnData : public ModelDimensions {
526552 * @brief Indices of the parameters w.r.t. which sensitivities were
527553 * computed.
528554 *
529- * The indices refer to parameter IDs in Model::getParameterIds() .
555+ * The indices refer to parameter IDs in `free_parameter_ids` .
530556 */
531557 std::vector<int > plist;
532558
559+ /* * IDs of the free parameters */
560+ const std::span<std::string_view const > free_parameter_ids;
561+
562+ /* * Names of the free parameters */
563+ const std::span<std::string_view const > free_parameter_names;
564+
565+ /* * IDs of the fixed parameters */
566+ const std::span<std::string_view const > fixed_parameter_ids;
567+
568+ /* * Names of the fixed parameters */
569+ const std::span<std::string_view const > fixed_parameter_names;
570+
571+ /* * IDs of state variables */
572+ const std::span<std::string_view const > state_ids;
573+
574+ /* * Names of state variables */
575+ const std::span<std::string_view const > state_names;
576+
577+ /* * IDs of solver state variables */
578+ const std::span<std::string_view const > state_ids_solver;
579+
580+ /* * Names of solver state variables */
581+ const std::span<std::string_view const > state_names_solver;
582+
583+ /* * IDs of observables */
584+ const std::span<std::string_view const > observable_ids;
585+
586+ /* * Names of observables */
587+ const std::span<std::string_view const > observable_names;
588+
589+ /* * IDs of expressions */
590+ const std::span<std::string_view const > expression_ids;
591+
592+ /* * Names of expressions */
593+ const std::span<std::string_view const > expression_names;
594+
533595 protected:
534596 /* * offset for sigma_residuals */
535597 realtype sigma_offset{0.0 };
0 commit comments