[kernel] add a warning when the simulation has multiple OSIs but the DS is not effected to one
@@ -193,14 +193,24 @@ void Simulation::initialize(SP::Model m, bool withOSI)
if (numberOfOSI() == 0)
RuntimeException::selfThrow("Simulation::initialize No OSI !");
-
DynamicalSystemsGraph::VIterator dsi, dsend;
SP::DynamicalSystemsGraph DSG = _nsds->topology()->dSG(0);
for (std11::tie(dsi, dsend) = DSG->vertices(); dsi != dsend; ++dsi)
{
// By default, if the user has not set the OSI, we assign the first OSI to all DS
+ // that has no defined osi.
if (!DSG->properties(*dsi).osi)
+ {
_nsds->topology()->setOSI(DSG->bundle(*dsi), *_allOSI->begin());
+ if (*_allOSI->begin() != *_allOSI->end())
+ {
+ std::cout <<"Warning. The simulation has multiple OSIs but the DS number "
+ << DSG->bundle(*dsi)->number()
+ << " is not affected to an OSI. We affect the first OSI to this DS."
+ << std::endl;
+
+ }
+ }
}
