You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!getFMUInfo()->getProvidesDirectionalDerivative())
1156
+
returnlogError("It is not possible to compute directionalDerivative for signal \"" + std::string(getFullCref() + cref) + "\" as providesDirectionalDerivative is false or not provieded in modelDescription.xml");
1157
+
1158
+
int j = -1;
1159
+
for (size_t i = 0; i < allVariables.size(); i++)
1160
+
{
1161
+
if (allVariables[i].getCref() == cref && allVariables[i].isTypeReal())
if (oms_modelState_instantiated == getModel().getModelState())
1172
+
{
1173
+
if (getFMUInfo()->getGenerationTool().substr(0, 12) == "OpenModelica")
1174
+
logWarning("It is not possible to get partial derivatives of OpenModelica generated fmus during initialization mode, getting directional derivative after intialization is possible");
1175
+
1176
+
// check index exist in ModelStructure inititalUnknowns
1177
+
auto index = values.modelStructureInitialUnknowns.find(j+1);
1178
+
if (index == values.modelStructureInitialUnknowns.end())
1179
+
returnlogError("Signal \"" + std::string(getFullCref() + cref) + "\" could not be resolved to an <InitialUnknowns> index in <ModelStructure>");
1180
+
1181
+
//get dependencylist from <InitialUnknowns> in <ModelStructure>
if (!getFMUInfo()->getProvidesDirectionalDerivative())
1151
+
returnlogError("It is not possible to compute directionalDerivative for signal \"" + std::string(getFullCref() + cref) + "\" as providesDirectionalDerivative is false or not provieded in modelDescription.xml");
1152
+
1153
+
int j = -1;
1154
+
for (size_t i = 0; i < allVariables.size(); i++)
1155
+
{
1156
+
if (allVariables[i].getCref() == cref && allVariables[i].isTypeReal())
if (oms_modelState_instantiated == getModel().getModelState())
1167
+
{
1168
+
if (getFMUInfo()->getGenerationTool().substr(0, 12) == "OpenModelica")
1169
+
logWarning("It is not possible to get partial derivatives of OpenModelica generated fmus during initialization mode, getting directional derivative after intialization is possible");
1170
+
1171
+
// check index exist in ModelStructure inititalUnknowns
1172
+
auto index = values.modelStructureInitialUnknowns.find(j + 1);
1173
+
if (index == values.modelStructureInitialUnknowns.end())
1174
+
returnlogError("Signal \"" + std::string(getFullCref() + cref) + "\" could not be resolved to an <InitialUnknowns> index in <ModelStructure>");
1175
+
1176
+
// get dependencylist from <InitialUnknowns> in <ModelStructure>
0 commit comments