|
@@ -177,21 +177,25 @@ namespace artis {
|
|
|
double time, const common::Model<common::DoubleTime>* model,
|
|
|
const std::string& selector_name, unsigned int variable_index)
|
|
|
{
|
|
|
- assert(model != nullptr)
|
|
|
+ assert(model != nullptr);
|
|
|
|
|
|
while (i < chain.size() - 1 and chain[i + 1] != ALL and model) {
|
|
|
+
|
|
|
assert(chain[i] >= 0);
|
|
|
+
|
|
|
model = model->get_submodel((unsigned int) chain[i]);
|
|
|
++i;
|
|
|
}
|
|
|
if (i < chain.size() - 1 and chain[i + 1] == ALL) {
|
|
|
|
|
|
- assert(model != nullptr)
|
|
|
+ assert(model != nullptr);
|
|
|
|
|
|
for (size_t model_index = 0;
|
|
|
model_index < model->get_submodel_number(chain[i]);
|
|
|
++model_index) {
|
|
|
+
|
|
|
assert(chain[i] >= 0);
|
|
|
+
|
|
|
observe(chain, i + 2, time,
|
|
|
model->get_submodel((unsigned int) chain[i],
|
|
|
model_index),
|