Terminate Experiment After Elapsed Time X


Author
Message
DCole9
DCole9
Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)
Group: Forum Members
Posts: 42, Visits: 220
Hey Inquisiters,
I'm trying to have my experiment terminate itself after expt.name.elapsedtime becomes > a certain duration.  I tried doing the following.

<trial>
...
/branch = [if (expt.myexpt.elapsedtime < 810000) block.theblock)]
</trial>
<exp myexptt>
/blocks [1 = theblock]
</expt>


This is giving me the error that block.theblock is the wrong element type.  I suspect that is because I am trying to branch to a block from a trial?  I have to code my experiment this way b/c my trials refresh on each button press (fills a bar).  So I have blocks as my "trials".  Is there a way to 'break' the experiment with a certain command or to branch to a block from a trial?  Maybe there is something I am missing.

Thanks for your time,
Dan





DCole9
DCole9
Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)
Group: Forum Members
Posts: 42, Visits: 220
I discovered the stop command--- seems to work well.  I was testing it in my experiment section and set it to stop the experiment after just 1 second.  However I noticed that the experiment continues well beyond one second.  Does it always finish the current block/trial/etc. before it terminates?
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
<trial>
...
/branch = [if (expt.myexpt.elapsedtime < 810000) block.theblock)]
</trial>

You cannot branch from a trial to a block. Branches must be at the same level, i.e. a trial can branch to another trial, a block can branch to another block.

The /stop attribute will *not* interrupt the currently running trial. It will only kick in once the trial terminates.

If you want a *hard* interrupt, use the /timeout attribute.

DCole9
DCole9
Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)Distinguished Member (4.4K reputation)
Group: Forum Members
Posts: 42, Visits: 220
Thanks for the response Dave.  /stop seems suitable for me.  
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search