Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#3673 closed enhancement (fixed)

Add a button for inferring bindings

Reported by: olero Owned by: adeas31
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 olero 9 years ago.
An idea of what it should look like
example.mo (414 bytes) - added by olero 9 years ago.
The example model
run.mos (117 bytes) - added by olero 9 years ago.
the script call
mediators.mo (455 bytes) - added by olero 9 years ago.
mediators used to calculate bindings

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by olero

An idea of what it should look like

comment:1 Changed 9 years ago by adeas31

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.

Changed 9 years ago by olero

The example model

Changed 9 years ago by olero

the script call

comment:2 Changed 9 years ago by olero

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 olero (previous) (diff)

Changed 9 years ago by olero

mediators used to calculate bindings

comment:3 Changed 9 years ago by adeas31

  • Resolution set to fixed
  • Status changed from new to closed

Done in 8dacf8d/OMEdit.

comment:4 Changed 9 years ago by dietmarw

  • Milestone changed from Future to 1.9.4

comment:5 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4 to 1.9.4-1.9.x

Milestone renamed

comment:6 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4-1.9.x to 1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.