Control panel

Explanation on the control panel.


The ControlPanel allows you to change the values for inputs to a model. It is typically the main entity that the user interacts with to generate design options.

With the ControlPanel you can,

💡 By default, if a model subscribes to a control panel, then any changes to the inputs will trigger the model to solve. If you only want the model to solve when certain inputs are changed, then you can use the triggerSolveOn option in the model configuration.

💡 The order of controls in your control panel configuration directly relates to the order of text and inputs in the solution.

Below is the configuration example. (Note that some content has been omitted.) In the example we assume that my-sphere-radius is an input to the model, and my-sphere-volume is an output from the model.

  kind: ControlPanel
      kind: Text
      text: My solution title
      type: h2
    my-sphere-radius: # must match GH model input
      kind: Slider
      label: My label
      value: 50
      min: 10
      max: 100
      precision: 1
    my-sphere-volume: # must match GH model output
      kind: Text
      text: ""
    - kind: Model
      frame: my-home-frame
      source: my-model
        my-sphere-volume: # must match GH model output
          type: setText


See the controlPanelConfig schema docs for more information.