WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 12-10-2012, 06:08 AM
new_horizon new_horizon is offline
Join Date: Apr 2010
Posts: 43
Method of Limits Program

Hi All,

This is a programming questions really, opposed to a Vizard specific question.

I want to set up an experiment where I have a vehicle traveling at a choice of six speeds (ranging from 20 mph to 60 mph).

I'd like the program to pick each speed at random, but not use each speed on more than four occasions. So if 20 mph has been presented four times, I'd like the program to select one of the speeds that has not exceeded the "max trials" if you like?

Can anyone show me the best way of achieving this? I have it working but the code is very clunky and long winded.

Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
User keyboard input without halting the program Zhi Vizard 2 06-23-2011 01:53 PM
How can i import the code form a Java program to Vizard? alberto_redo Vizard 1 10-07-2010 01:18 PM
How do I run a destructor before the end of the program? EnvisMJ Vizard 3 12-14-2009 06:17 PM
Get position data in an own little program Researcher Precision Position Tracker (PPT) 2 02-01-2006 03:55 AM
Loading .3ds-Files without interrupting Program flow Stefan Vizard 10 06-08-2005 05:44 PM

All times are GMT -7. The time now is 12:05 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC