Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.6K Views
|
4 Replies
|
4 Total Likes
View groups...
Share
Share this post:

The SystemModel directive cannot read the model

Posted 2 years ago

I encountered an error reading the model using the SystemModel instruction. What is the reason for this?

model = SystemModel["Model2"]

enter image description here

Attachments:
POSTED BY: James James
4 Replies
POSTED BY: Sergio Vargas
Posted 2 years ago

Sir, I have successfully imported the model. Next, I want to linearize it using the SystemModelLinearize instruction, but the system prompts this error. How can I resolve it? Thank you!

model = Import["C:\\Users\\james\\Desktop\\Model2.mo", "MO"];
list = model["TopParameterNames"];
vars = list /. {QuantityVariable[x_, __] :> x};
SystemModelLinearize[model, 
  Method -> {"SymbolicDerivative", 
      "SymbolicParameters" -> vars}]

enter image description here

The model position can be changed according to your needs.

Attachments:
POSTED BY: James James

The model has not been loaded. Load it with Import, see: https://reference.wolfram.com/language/ref/format/MO.html

POSTED BY: Sergio Vargas
Posted 2 years ago

Sir, am I writing correctly? But the running results clearly indicate that I wrote incorrectly emm...

model = Import["Model2.mo", "MO"]

enter image description here

And how can I use the ImportString command to load a file? You used it in your previous reply. enter image description here

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