Message Boards Message Boards

0
|
8426 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Avoid problems with WSMModelData - slow or fails to evaluate?

I have a fairly simple model that uses the Media library and fluid ports. When trying to use WSMModelData[model,"Summary"] the expression takes way to long or hangs (I haven't seen an output). The examples in the documentation work fine. The same is true of other WMModelData properties like OutputVariables. ParameterValues works but is slow.

I have an algorithm section in my model so I get the message

Model was not translated completely: "Algorithm sections only supported in functions"

But I wouldn't expect that to prevent WSMModelData from returning some of the properties of the model. I've tested this on both macOS and Windows.

POSTED BY: Eric Smith

When trying to use WSMModelData[model,"Summary"] the expression takes way to long or hangs (I haven't seen an output)

It runs a validation of the model, which can take a long time if the model is complicated to validate. This is sometimes the case for Media models.

The same is true of other WMModelData properties like OutputVariables. ParameterValues works but is slow.

This has to do most of the processing that building the model does, so it also does a lot of work.

But I wouldn't expect that to prevent WSMModelData from returning some of the properties of the model.

It shouldn't if the model is valid. If you would like to share the model, we could have a look to see if there is a bug.

POSTED BY: Malte Lenz
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract