Opened 4 years ago

Last modified 3 years ago

#6424 assigned defect

linear_model.py : two syntax errors

Reported by: anonymous Owned by: arunkumar palanisamy
Priority: low Milestone:
Component: *unknown* Version: 1.16.2
Keywords: Linearized_model python Cc:

Description

Good morning,

after call of linearize with --linearizationDumpLanguage=python there is two syntax erros

def linearized_model() should be terminate by : so
def linearized_model():

No "end" at the end of file in python

In file : OpenModelica-master/OMCompiler/Compiler/Template/CodegenC.tpl

template functionlinearmodelPython from line 4806 to 4845

in particular line 4821 :

return "def linearized_model()\n"

become return "def linearized_model():\n"

lines 4837-3488

" return (n, m, p, x0, u0, A, B, C, D)\n"
"end";

become " return (n, m, p, x0, u0, A, B, C, D)\n";

Best regards

Change History (5)

comment:1 by hanshell <hans.hell@…>, 4 years ago

same observation
see forum https://www.openmodelica.org/forum/default-topic/3136-discussion-on-linearization
and ticket 6273
I'm not sure if MATLAB code generation --linearizationDumpLanguage=matlab works correct


comment:2 by Adrian Pop, 4 years ago

Owner: changed from somebody to arunkumar palanisamy
Status: newassigned

comment:3 by Francesco Casella, 4 years ago

Milestone: NeedsInput1.18.0

comment:4 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.