Opened 4 years ago

Last modified 3 years ago

#6424 assigned defect

linear_model.py : two syntax errors

Reported by: anonymous Owned by: arun3688
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 Changed 4 years ago by hanshell <hans.hell@…>

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 Changed 4 years ago by adrpo

  • Owner changed from somebody to arun3688
  • Status changed from new to assigned

comment:3 Changed 4 years ago by casella

  • Milestone changed from NeedsInput to 1.18.0

comment:4 Changed 3 years ago by casella

  • Milestone 1.18.0 deleted

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.