First time here? Checkout the FAQ!
0 votes
by (220 points)


is there an easy way to define a variable as a state variable so it is initialised and afterwards changed based on the most recent value? For example in python this would just be:

x = 0.74

z = x/(0.009*y)

x = z - 0.001/y

1 Answer

+1 vote
by (17.5k points)
selected by
Best answer

I think you can use the .store() markup to directly set the new value for x:

Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance