When I put a value in the slider, it becomes invalid

I would like to use a python script to analyze a pair of sampled variables by putting them into a slider, but when the slider has a sampled value, the line turns red as shown in the image. The image shows the case where only the first slider has a sample value, but subsequent sliders behave in the same way. I would appreciate it if you could tell me what to do.

ParametricTruss.gh (152.0 KB)

I have not all the plugins so I can’t test, but for my tool I added that :
This must force GH to recalculate the solution beginning at the slider.

Thank you for your response. I tried inserting the code you suggested, but it didn’t work.

I found that when the lines turn red, adding a new object (such as a relay in this image) to the document makes the slider values reflect properly in the model, and subsequent calculations proceed smoothly. However, doing this manually every time is very tedious. Is there a way to automate this process with a Python script?