Question #697379 on Yade changed:
https://answers.launchpad.net/yade/+question/697379

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

> 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
iteration.

> 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]
    adjustParametersAccordingToResult()
###
Python reads and executes the code line-by-line.
Here, without any running, it just goes to the next iteration, as it is said.

Cheers
Jan

[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.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to