Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2008
    Posts
    9

    Unanswered: adding travel times without regards for timestamp

    I have the attached database file with the form CalcTravelTime. I also have a code associated with the command button as you can see. The code lets the travel time step up to the next 5 minute interval after the travel time gets over 300 seconds or 5 minutes.

    Basically what I need help doing is to eliminate the way the code steps up to the next 5 minute interval. Whether that be changing the code or eliminating part of the code. That is the part I'm not sure of.

    So really I still need the total travel time summation but without the step up to the next interval. Also I would like to keep it in the same format as the attached file if possible. Thank you
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2008
    Posts
    9
    Is this possible?? anyone??

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    I don't have time to look through your db to find where your problem lies
    Perhaps if you could explain what the business problem is

    incidentally I think you are making life hard for yourself by storing a date time value as a string, rather than a datetime (segtimestamp?)

    the bit I don't understand is the need for a step up to the next time band
    frankly its my lack of comprehension of what it is you are trying to do that stops me from assisting, or delving into your code in any detail

    some comments in the code would be nice, to identify wtf is going on...
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Nov 2008
    Posts
    9
    ok I will explain...at first I wanted to get travel time over the various segments listed in the db and to do that you have to get the summation of travel time and each segment has a travel time associated with it at a particular timestamp.

    I must move to the next timestamp because each segment is about 1 mile long and, for example, just say it takes 50 seconds to traverse each segment and say I need to know travel time to get to segment 9 from segment 1 at 1:00:00 am. So we know that it takes 450 seconds to pass through the segment (9 segments * 50 seconds). But since I divided into five minutes segments, after 300 seconds or 5 minutes, the travel times for 1:00:00 am I used will no longer be relevant and I must move up to the next timestamp for whatever segment at first went over the 300 second cutoff. In this example we know this will happen at segment 6 (6 segment * 50 seconds = 300 seconds) therefore starting with segment 7 the form will use timestamp 1:05:00 am to get the actual travel time of the entire study segment.

    Now that is what the attached db already does. So what I am looking for is the posted travel time, meaning (using previous example) instead of jumping to timestamp 1:05:00 am at segment 7 stay with timestamp 1:00:00 am. But I would like to keep it in the form format attached. But if you had an easier way that would display all combinations of segments and timestamp then I am all ears. Thanks for taking the time

  5. #5
    Join Date
    Nov 2008
    Posts
    9
    also I am not to familar with the code for comments, a friend gave it to me to work with...sorry

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    can you try explaining it in as a business requirement

    int he DB world timestamp has a very specific meaning (its the date and time an event took place)

    I don't understand your concept of segments
    I don't understand the travel time, or where the figure of 560 seconds per segment, and 9 segments (per journey?)

    is what you are trying to do to find the next free slot?
    where does the magic number of 300 come in, why is five minutes relevant

    Perhaps rather than refer to your current db, explain what the business requirement is

    It could be
    for planning purposes departure times are allocated in 5 minutes blocks, a journey can only be started at 5 minute intervals, so if a journey starting at 12:00 takes 90 seconds the next one can start at 12:05, if it took 310 seconds the next one can start at 12:10

    what I don't comprehend is where the 9, or 7 segements comes in, where the seconds per segment, number fo segments per journey
    I'd rather be riding on the Tiger 800 or the Norton

  7. #7
    Join Date
    Nov 2008
    Posts
    9
    the last post was just an example of what the db dase that is attached in the first post so you could see more clearly..

    There are 15 segments in my study and each segment 1-15 has a travel time associated with it for each 5 minutes during the day...therefore each segment has 288 travel times associated with each of the 15 segments...if you look at the table in the attached db (TravelSegments) you will see what I am talking about and just open the form in the attached db and pick a number in the start segment box and end segment box and then pick a travel time and hit calculate time. That would be a lot easier than for me to explain it typing over here. Then try and read my last post and see if it makes any sense

    there's no business way I can really describe it..I just am looking for what the attached db does but without moving to the next timestamp to retrieve the travel time...this is actual data from another DB so timestamp is the actual time that these events occured..I have a distance for each segment and speed to get that travel time you see in the table

    A journey can start at any 5 minute timestamp (in regards to my DB) throughout the day, the trick is to know how long it takes to traverse the segment to segment journey you use at the specified timestamp (travel time)...if the travel time is longer than 300 seconds at a 5 minute (300 seconds) timestamp then the travel times from the next 5 minute timestamp must be used for the remaing segments left in your segment to segment analysis
    Last edited by diegog7; 11-11-08 at 16:02.

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    good luck with your project
    Im none the wiser
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •