building-envelope-data / api

API specification to exchange data about building envelopes
MIT License
3 stars 1 forks source link

Add models to components #210

Open christoph-maurer opened 3 years ago

christoph-maurer commented 3 years ago

We could add models which calculate output values like solar transmission and heat transfer based on input values and parameters like irradiance and slat tilt angle. A model could be defined directly in component by a reference or by a repository. It could also be defined as a service. In this case, it would be helpful to define schemas for each input, parameter and output value.

For this topic, a suitable follow-up project is necessary.

christoph-maurer commented 3 years ago

After November 2021, models could be added to optical, calorimetric, ... by adding the property

  "models": {
    "type": "array",
    "items": {
      "title": "A model receives arguments and source data and generates result data.",
      "type": "object",
      "properties": {
        "method": {
          "$ref": "#/$defs/method",
          "description": "Method which describes the model."
        },
        "arguments": {          
            "$ref": "https://json-schema.org/draft/2019-09/schema",
            "description": "JSON schema for the arguments of the model."
        },
        "sources": {
          "$ref": "https://json-schema.org/draft/2019-09/schema",
            "description": "JSON schema for the source data of the model."
        },
        "results": {
          "$ref": "https://json-schema.org/draft/2019-09/schema",
            "description": "JSON schema for the result data of the model."
        }
      },
      "additionalProperties": false,
      "required": ["method", "arguments", "sources"]
    },
    "minItems": 1
  },

This is similar to appliedMethod, but differs regarding arguments, sources and results.