Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3673 closed enhancement (fixed)

Add a button for inferring bindings

Reported by: Olena Rogovchenko Owned by: Adeel Asghar
Priority: high Milestone: 1.9.4
Component: OMEdit Version: v1.9.4-dev-nightly
Keywords: Cc: adeel.asghar@…

Description

I need a button in the right click menu that calls "infer bindings" and passes it as arguments the path of the current class (the one right clicked) and the current program. The result is an update program where the model definition will be updated, and this should be updated in the editor.

Attachments (4)

Requirement_Modeling.pdf (159.6 KB ) - added by Olena Rogovchenko 9 years ago.
An idea of what it should look like
example.mo (414 bytes ) - added by Olena Rogovchenko 9 years ago.
The example model
run.mos (117 bytes ) - added by Olena Rogovchenko 9 years ago.
the script call
mediators.mo (455 bytes ) - added by Olena Rogovchenko 9 years ago.
mediators used to calculate bindings

Download all attachments as: .zip

Change History (10)

by Olena Rogovchenko, 9 years ago

Attachment: Requirement_Modeling.pdf added

An idea of what it should look like

comment:1 by Adeel Asghar, 9 years ago

Can you provide a mos-script for it with a text model? I need to know how it is working with OMC. If you have any test-case for in the test-suite then just send me a link of it.

by Olena Rogovchenko, 9 years ago

Attachment: example.mo added

The example model

by Olena Rogovchenko, 9 years ago

Attachment: run.mos added

the script call

comment:2 by Olena Rogovchenko, 9 years ago

I attached an example model + script call, the call will update the model TestModel
from

model TestModel

test.PumpR pr;
test.SystemModel sm;

end TestModel;

to

model TestModel

test.PumpR pr(inOperation = sum({if pa.on then 1 else 0, if pb2.volFlowRate > 0 then 1 else 0, if pb.volFlowRate > 0 then 1 else 0}));
test.SystemModel sm;

end TestModel;

And that is what should be reloaded in the editor.

I hope it is clearer.

Last edited 9 years ago by Olena Rogovchenko (previous) (diff)

by Olena Rogovchenko, 9 years ago

Attachment: mediators.mo added

mediators used to calculate bindings

comment:3 by Adeel Asghar, 9 years ago

Resolution: fixed
Status: newclosed

Done in 8dacf8d/OMEdit.

comment:4 by Dietmar Winkler, 9 years ago

Milestone: Future1.9.4

comment:5 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:6 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.