summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFahim2015-10-21 16:58:26 +0530
committerFahim2015-10-21 16:58:26 +0530
commite383c8b9dd13465dc8b7cad2586e1db829845ff8 (patch)
tree23afc79435b39a7d1f7b65df6f13aef1153cb00f
parent506936250356ec10422933e04257c00facd77159 (diff)
downloadeSim-e383c8b9dd13465dc8b7cad2586e1db829845ff8.tar.gz
eSim-e383c8b9dd13465dc8b7cad2586e1db829845ff8.tar.bz2
eSim-e383c8b9dd13465dc8b7cad2586e1db829845ff8.zip
Subject: OpenModelica- Added comma in parameter line
Description: OpenModelica- Added comma in parameter line to separate each parameter with comma
-rw-r--r--src/ngspicetoModelica/NgspicetoModelica.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ngspicetoModelica/NgspicetoModelica.py b/src/ngspicetoModelica/NgspicetoModelica.py
index 3cb7a8a6..3b1752d3 100644
--- a/src/ngspicetoModelica/NgspicetoModelica.py
+++ b/src/ngspicetoModelica/NgspicetoModelica.py
@@ -117,9 +117,15 @@ class NgMoConverter:
modelicaParam = []
for eachline in paramInfo:
eachline = eachline.split('.param')
- stat = 'parameter Real ' + eachline[1] + ';'
+ #Include ',' in between parameter
+ #Removing leading and trailing space
+ line = eachline[1].strip()
+ line = line.split()
+ final_line = ','.join(line)
+ stat = 'parameter Real ' + final_line + ';'
stat = stat.translate(maketrans('{}', ' '))
modelicaParam.append(stat)
+ print "Modelica Parameter----------->",modelicaParam
return modelicaParam