Component Stream (Freeze/Gate) - Heteroptera 0.6.2.4 - Behaves erratically on ShapeDiver

Hello
I’m working in a model where the input parameters must be evaluated first, and if any parameter is out of range, the model should use the latest valid set of parameters.

Premises:

  1. The user will enter the parameters manually (no slider) using SDTextInput component (ShapeDiver), therefore there may be typographical errors.

  2. If any input parameter is out of range, the model should not be updated in the viewer, only an error message will be displayed.

  3. A simple definition with supported components is preferred. No manual coding either.

For that purpose I’m using Stream (Freeze/Gate) component (Heteroptera 0.6.2.4). It’s the only component I could find that serves the purpose and is also supported by ShapeDiver.

The definition works perfectly fine locally in my computer, but on the ShapeDiver’s server this component (gate) is behaving erratically.
Most of the time the model disappears from the viewer when input parameters are out of range. Sometimes it disappears even with parameters in range, some other times it changes the parameter values randomly, very strange.

I already tried all I could thing of to make it work, I used different arrangements and settings with this gate, but nothing seems to fix it :frowning:
I even created a table (debugging) to be able to “see” the gate’s input/output values. This table is shown in the ShapeDiver viewer as well, I’m hopping it could help to understand where the problem is.

The definition file is also attached.
Chair with Data-Gate.gh (169.9 KB)

I hope somebody could tell me if I am doing something wrong, or if there is a problem with this Stream (Freeze/Gate) component?

I appreciate all your help on this one.
Thanks

Hi Edward

The Freeze/Gate component in Heteroptera will not work as expected in ‘Freeze’ mode when running on ShapeDiver. The reason for this is the way Grasshopper instances are assigned to ShapeDiver viewer instances. Check out this blog post to learn more about it: Behind ShapeDiver: How We Scale Grasshopper For Cloud Applications!
TL;DR, Avoid the need for a model to ‘remember’ data from previous computations, as it will not be reliable. The ‘erratic’ behavior is not consistent since sometimes your assigned grasshopper instance might not be changing between two computations.
If you wish to have multiple steps in a script, I’d recommend sticking to using the Stream Filter or Stream Gate components. You may use Heteroptera’s Freeze/Gate component, but only in ‘Gate’ mode.
I hope this helps. Apologies for the delayed response.