Opened 9 years ago
Closed 8 years ago
#4253 closed defect (fixed)
inverse in OM
| Reported by: | Owned by: | Patrick Täuber | |
|---|---|---|---|
| Priority: | high | Milestone: | 1.13.0 |
| Component: | Backend | Version: | v1.12.0 |
| Keywords: | Cc: |
Description (last modified by )
Hello.
How I can realize this function:
x = y2, but (-y)2 = -x, sqrt(-x) = -y.
My attempt to make this function in file.
Attachments (1)
Change History (5)
by , 9 years ago
| Attachment: | reverseTest.onb added |
|---|
comment:1 by , 8 years ago
| Component: | *unknown* → Backend |
|---|---|
| Milestone: | Future → 1.13.0 |
| Owner: | changed from to |
| Status: | new → assigned |
comment:2 by , 8 years ago
There was a bug in the variable replacements. After fixing it in OMCompiler/c22c35b the equation cannot be solved explicitly anymore, thus the results are now correct.
comment:3 by , 8 years ago
shabunin_a@…, please check and close the ticket if everything is fine for you after this fix.
comment:4 by , 8 years ago
| Description: | modified (diff) |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
| Type: | task → defect |
I assume it's fixed and will close this.
Note:
See TracTickets
for help on using tickets.

I had a look on your example, using OMEdit and the Transformational Debugger.
Point 1, as far as I know, the inverse annotation is still not supported by OMC, so it will just ignored.
Point 2: the Inline annotation has a capital "I", if you write
annotation(inline = false))]it will simply be ignored.Point 3: if you don't put an
Inline = falseannotation in functionx_to_y, the backend somehow tries to inline it and solve it explicitly, but doesn't do it correctly:So, a simple solution to your problem is just to add
annotation(Inline = false)inx_to_y@ptaeuber, can you have a look at the wrong solution of the inverse function?