Is it possible to call a Mathematica function from a SystemModeler component?
Clash Royale CLAN TAG#URR8PPP
up vote
7
down vote
favorite
Is it possible to call Mathematica 11.3 functions from a SystemModeler 5.1 component?
I see that Mathematica can run a SystemModeler simulation. Are there any examples of this?
It would be very useful to be able to create custom SystemModeler blocks that call Mathematica functions.
It appears that the Mathematica may make calls the SystemModeler. Can SystemModeler call Mathematica?
system-modeler
add a comment |Â
up vote
7
down vote
favorite
Is it possible to call Mathematica 11.3 functions from a SystemModeler 5.1 component?
I see that Mathematica can run a SystemModeler simulation. Are there any examples of this?
It would be very useful to be able to create custom SystemModeler blocks that call Mathematica functions.
It appears that the Mathematica may make calls the SystemModeler. Can SystemModeler call Mathematica?
system-modeler
You can at least write numerical functions in Mathematica and compile them down to C. Thus you can use Mathematica to write exogenous functions for Modelica models.
– gwr
7 mins ago
add a comment |Â
up vote
7
down vote
favorite
up vote
7
down vote
favorite
Is it possible to call Mathematica 11.3 functions from a SystemModeler 5.1 component?
I see that Mathematica can run a SystemModeler simulation. Are there any examples of this?
It would be very useful to be able to create custom SystemModeler blocks that call Mathematica functions.
It appears that the Mathematica may make calls the SystemModeler. Can SystemModeler call Mathematica?
system-modeler
Is it possible to call Mathematica 11.3 functions from a SystemModeler 5.1 component?
I see that Mathematica can run a SystemModeler simulation. Are there any examples of this?
It would be very useful to be able to create custom SystemModeler blocks that call Mathematica functions.
It appears that the Mathematica may make calls the SystemModeler. Can SystemModeler call Mathematica?
system-modeler
system-modeler
edited 8 hours ago
asked 8 hours ago
Doug Kimzey
819515
819515
You can at least write numerical functions in Mathematica and compile them down to C. Thus you can use Mathematica to write exogenous functions for Modelica models.
– gwr
7 mins ago
add a comment |Â
You can at least write numerical functions in Mathematica and compile them down to C. Thus you can use Mathematica to write exogenous functions for Modelica models.
– gwr
7 mins ago
You can at least write numerical functions in Mathematica and compile them down to C. Thus you can use Mathematica to write exogenous functions for Modelica models.
– gwr
7 mins ago
You can at least write numerical functions in Mathematica and compile them down to C. Thus you can use Mathematica to write exogenous functions for Modelica models.
– gwr
7 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
5
down vote
It is not in general possible (at this point) to call WL functions from SystemModeler components.
I (as a member of the SystemModeler development team) agree that it would be a great feature to have.
What you can currently do is use functions that are simple enough to be converted to Modelica (the language used by SystemModeler models) in CreateSystemModel:
model = CreateSystemModel[Unevaluated[Function[#1 + Sin[#2]]][1,
u[t]] == u'[t], t]
The Scope section of the CreateSystemModel reference page has an overview of what is currently supported.
We are talking calls to Mma functions before compilation of a model though, aren‘t we? Wouldn‘t these functions have to be embedded (thus in C) in the compiled model?
– gwr
2 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
It is not in general possible (at this point) to call WL functions from SystemModeler components.
I (as a member of the SystemModeler development team) agree that it would be a great feature to have.
What you can currently do is use functions that are simple enough to be converted to Modelica (the language used by SystemModeler models) in CreateSystemModel:
model = CreateSystemModel[Unevaluated[Function[#1 + Sin[#2]]][1,
u[t]] == u'[t], t]
The Scope section of the CreateSystemModel reference page has an overview of what is currently supported.
We are talking calls to Mma functions before compilation of a model though, aren‘t we? Wouldn‘t these functions have to be embedded (thus in C) in the compiled model?
– gwr
2 mins ago
add a comment |Â
up vote
5
down vote
It is not in general possible (at this point) to call WL functions from SystemModeler components.
I (as a member of the SystemModeler development team) agree that it would be a great feature to have.
What you can currently do is use functions that are simple enough to be converted to Modelica (the language used by SystemModeler models) in CreateSystemModel:
model = CreateSystemModel[Unevaluated[Function[#1 + Sin[#2]]][1,
u[t]] == u'[t], t]
The Scope section of the CreateSystemModel reference page has an overview of what is currently supported.
We are talking calls to Mma functions before compilation of a model though, aren‘t we? Wouldn‘t these functions have to be embedded (thus in C) in the compiled model?
– gwr
2 mins ago
add a comment |Â
up vote
5
down vote
up vote
5
down vote
It is not in general possible (at this point) to call WL functions from SystemModeler components.
I (as a member of the SystemModeler development team) agree that it would be a great feature to have.
What you can currently do is use functions that are simple enough to be converted to Modelica (the language used by SystemModeler models) in CreateSystemModel:
model = CreateSystemModel[Unevaluated[Function[#1 + Sin[#2]]][1,
u[t]] == u'[t], t]
The Scope section of the CreateSystemModel reference page has an overview of what is currently supported.
It is not in general possible (at this point) to call WL functions from SystemModeler components.
I (as a member of the SystemModeler development team) agree that it would be a great feature to have.
What you can currently do is use functions that are simple enough to be converted to Modelica (the language used by SystemModeler models) in CreateSystemModel:
model = CreateSystemModel[Unevaluated[Function[#1 + Sin[#2]]][1,
u[t]] == u'[t], t]
The Scope section of the CreateSystemModel reference page has an overview of what is currently supported.
answered 42 mins ago
Malte Lenz
2,0831118
2,0831118
We are talking calls to Mma functions before compilation of a model though, aren‘t we? Wouldn‘t these functions have to be embedded (thus in C) in the compiled model?
– gwr
2 mins ago
add a comment |Â
We are talking calls to Mma functions before compilation of a model though, aren‘t we? Wouldn‘t these functions have to be embedded (thus in C) in the compiled model?
– gwr
2 mins ago
We are talking calls to Mma functions before compilation of a model though, aren‘t we? Wouldn‘t these functions have to be embedded (thus in C) in the compiled model?
– gwr
2 mins ago
We are talking calls to Mma functions before compilation of a model though, aren‘t we? Wouldn‘t these functions have to be embedded (thus in C) in the compiled model?
– gwr
2 mins ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f182673%2fis-it-possible-to-call-a-mathematica-function-from-a-systemmodeler-component%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You can at least write numerical functions in Mathematica and compile them down to C. Thus you can use Mathematica to write exogenous functions for Modelica models.
– gwr
7 mins ago