← Back to team overview

yade-users team mailing list archive

Re: [Question #697379]: Optimise material parameter


Question #697379 on Yade changed:

    Status: Open => Answered

Jan Stránský proposed the following answer:

> The code is not going through the loop

the "code" DOES go through the loop (as you describe yourself below) and
does exactly what it is tell to do inside. Which is: set materials,
particles, engines etc. and then directly go to the next for-loop

> The for loop runs by it self initially and even before simulation starts, and i set to 99 when the simulation starts.
> How can I run my simulation in the loop, for n number of iteration. And changing the parameter for each iteration.

so start the simulation before "you set to 99". Just use some running command inside the for loop:
for i in range (0,n_iter,1):
    # everything what you have now
    O.run(); O.wait() # or other stop condition [1]
Python reads and executes the code line-by-line.
Here, without any running, it just goes to the next iteration, as it is said.


[1] https://yade-dem.org/doc/user.html#stop-conditions

You received this question notification because your team yade-users is
an answer contact for Yade.