wiki:TanmayTasks

Version 11 (modified by jdalbey, 6 years ago) (diff)

add 6

Tanmay Tasks

Estimated time in parentheses.

Graphic traffic events creator.

  1. Add 3 color buttons (2)
  1. On second click, change remaining dots to current color. (1.5)
  1. Assemble one line of traffic file. (2)
  1. Have buttons change to named color when clicked. Turn off when another button clicked. Initially, have Yellow button active (avoids having "undefined" appear in output file). See attached color button html demo. (1)
  1. Have the program automatically increment the time by 30 seconds for each line of output. The following code should do the trick. It just needs to be inserted into the appropriate spot in vdsLayer. (0.5)
    ~~// Initialize the current time to zero
    var currentTime = new Date(0);
    currentTime.setHours(0);
    currentTime.setMinutes(0);
    currentTime.setSeconds(0);
    
    // Increment the time by one-half minute (30 seconds)
    var millisecs = currentTime.getTime();
    millisecs += 30000;  
    var currentTime = new Date(millisecs)
    
    // Create a printable string for the time (HH:MM:SS)
    var printableTime = currentTime.toLocaleTimeString('it-IT')~~
    
  1. Add a time selector - this is used to select the simulation time for which the traffic events are to be created. The user specifies an hour (1-12), a minute(0-59), and seconds (0 or 30). The simplest version is probably just a text field that looks like the one in Visualizer. The program should begin at time 00:00:30 and auto increment (as in task 5), but the text field allows the user to override the time and manually enter a time of their own. Once the user enters a time manually, that becomes the new value to use to auto increment. For example,
    00:00:30  auto
    00:00:60  auto
    00:01:30  auto
    00:01:45  manual
    00:02:15  auto
    00:02:45  auto
    

Attachments