← Back to team overview

yade-users team mailing list archive

Re: [Question #240225]: deactivate and activate engines in CombinedKinematicEngine

 

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

    Status: Open => Answered

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

yes, you can set different dead values of engines according to runtime
conditions (see also [1]). I think that the easiest way is to add PyRunned
to O.engines with iterPeriod=1, checking some constidion and switching
dead=True/False if the condition is met.

But I think that amplitude is not very good trigger, as it is an attribute
of the HarmonicRotationEngine and is constant (if you don't change it from
outside).

cheers
Jan

[1] https://answers.launchpad.net/yade/+question/237437
PS: sorry for very quick answer due to lack of time, in case it is not
clear, I will try to explain more in detail tomorrow



2013/12/3 Oguz Cebeci <question240225@xxxxxxxxxxxxxxxxxxxxx>

> New question #240225 on Yade:
> https://answers.launchpad.net/yade/+question/240225
>
> Hi,
> I want to ask, if it's possible to deactivate one engine and activate
> other, when some attribute of engine one is reached. For example:
> Engine one starts. If it's Amplitude reaches a Value, engine one should
> stop and Engine two + three starts. is there any possibility?
> Like:
>
>
> CombinedKinematicEngine(ids=fctIds,label='comb')
>
> +HarmonicRotationEngine(ids=fctIds,rotationAxis=[1,0,0],zeroPoint=(0,0,0),rotateAroundZero=True,A=-.5,f=1,dead=False,)
>
> If A reaches -.5 start stop the first engine and start the rest. Dead=True
> for engine one
>
>
>
>
> +HarmonicRotationEngine(ids=fctIds,rotationAxis=[1,0,0],zeroPoint=(0,0,0),rotateAroundZero=True,A=.5,f=1,dead=False)
>
> +HarmonicRotationEngine(ids=fctIds,rotationAxis=[0,1,0],zeroPoint=(0,0,0),rotateAroundZero=True,A=.5,f=1,dead=False,)
>
>
>
> Sry for bad english,
> Best regards
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.