From 2027739a0f5bae5e7c9041e6d471d470362d9e90 Mon Sep 17 00:00:00 2001 From: arun3688 Date: Thu, 17 Aug 2023 12:32:42 +0200 Subject: [PATCH] parse min and max attribute --- src/OMJulia.jl | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/OMJulia.jl b/src/OMJulia.jl index 72cb143..50281ba 100644 --- a/src/OMJulia.jl +++ b/src/OMJulia.jl @@ -349,10 +349,22 @@ function xmlparse(omc) subchild = child_elements(r) for s in subchild value = attribute(s, "start") + min = attribute(s, "min") + max = attribute(s, "max") if (value !== nothing) - scalar["value"] = value + scalar["start"] = value else - scalar["value"] = "None" + scalar["start"] = "None" + end + if (min !== nothing) + scalar["min"] = min + else + scalar["min"] = "None" + end + if (max !== nothing) + scalar["max"] = max + else + scalar["max"] = "None" end end if (omc.linearFlag == false) @@ -360,17 +372,17 @@ function xmlparse(omc) if haskey(omc.overridevariables, scalar["name"]) omc.parameterlist[scalar["name"]] = omc.overridevariables[scalar["name"]] else - omc.parameterlist[scalar["name"]] = scalar["value"] + omc.parameterlist[scalar["name"]] = scalar["start"] end end if (scalar["variability"] == "continuous") - omc.continuouslist[scalar["name"]] = scalar["value"] + omc.continuouslist[scalar["name"]] = scalar["start"] end if (scalar["causality"] == "input") - omc.inputlist[scalar["name"]] = scalar["value"] + omc.inputlist[scalar["name"]] = scalar["start"] end if (scalar["causality"] == "output") - omc.outputlist[scalar["name"]] = scalar["value"] + omc.outputlist[scalar["name"]] = scalar["start"] end end if (omc.linearFlag == true)