lbl-srg / ctrl-flow-dev

ctrl-flow development
Other
0 stars 0 forks source link

Arithmetic expressions are not being split into operators and operands #191

Open darenkeck-dev opened 1 year ago

darenkeck-dev commented 1 year ago

Arithmetic expressions are not being split split into operands and operators. This potentially is an issue with the modelica-json parser or our own parser.

If you look at the parameter: "Buildings.Templates.Components.Fans.ArrayVariable.volInl"

The linkage schema output of that parameter looks as follows:

    {
      "modelicaPath": "Buildings.Templates.Components.Fans.ArrayVariable.volInl",
      "type": "Fluid.Delays.DelayFirstOrder",
      "value": "",
      "name": "Fluid volume at inlet",
      "group": "",
      "tab": "",
      "visible": false,
      "inputs": [],
      "modifiers": {
        ...
        "Buildings.Templates.Components.Fans.ArrayVariable.nPorts": {
          "operator": "none",
          "operands": [
            "nFan +1"
          ]
        }
      },

The operand is nFan +1 when it should be a new expression with an operator of '+' and two operands.

This is also true for subtraction if you refer to Buildings.Fluid.Interfaces.PartialTwoPartInterface.dp which generates an operand of port_a.p -port_b.p.

AntoineGautier commented 2 months ago

This is still open.