Safe Speed Forums

The campaign for genuine road safety
It is currently Tue Nov 11, 2025 04:22

All times are UTC [ DST ]




Post new topic Reply to topic  [ 54 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Collision simulator
PostPosted: Sun Aug 07, 2005 19:13 
Offline
Life Member
Life Member

Joined: Sat Mar 27, 2004 13:50
Posts: 2643
Some two years ago I put together a collision simulator, to analyse road collisions - as I don't have the luxury of comprehensive 'real-world' data.
It works OK, and it has certainly dispelled some pre-conceived ideas I had.
However, in its original form it was unwieldly and difficult to understand and to use.
I have now cleaned it up into a form which is (hopefully) much easier to use and understand.
It just generates simulated accident data - which should then be fed into Excel or something for further analysis.

Paul has kindly placed it on the SafeSpeed site, and you can download it here

Feel free to mess around with it as you wish. Instructions are in the readme.txt file.
I have included the source code for anybody who has the desire to see what makes it tick.
If you come across any bugs, please let me know and I'll fix them - unless you want to have a pop at it yourself - but please inform me anyway.

Cheers
Peter

_________________
Only when ideology, prejudice and dogma are set aside does the truth emerge - Kepler


Top
 Profile Send private message  
 
 Post subject: Re: Collision simulator
PostPosted: Fri Aug 12, 2005 16:10 
Offline
Banned
Banned

Joined: Thu Apr 15, 2004 12:47
Posts: 2291
Pete317 wrote:
Some two years ago I put together a collision simulator, to analyse road collisions


Pete317 wrote:
Perhaps we should move this discussion onto the 'collision simulator' thread.


I've been reading your code & thinking about your ingenious model. Basically, I believe that the reaction time needs more light throwing on it.

We assume that, fast or slow, you become aware of an event at a similar distance from it. But when you are fast, you have less time before you have to take action than when you are going slow. If the distance for pondering the problem is fixed, so the time must be less when you are zooming along. Also, I reckon that when you are going fast, things change at a faster rate, the situation develops faster, and a driver has more information to absorb in the shorter time.

So there is less time and more data, so surely those two things must sometimes affect the quality of the eventual judgement and action, especially in tight situations?

But how can I model quality? I’ve made a few changes, and recompiled the model. The changes relate to a speed-related reaction time penalty, linear or related to the square of the speed. I thought of dealing with it qualitatively (which is more complex), but as this is a random simulator, and qualitative changes would only come out in the statistics anyway, I’ve added a penalty to the reaction time based on the speed when the ‘event’ is observed. At least, I think that’s what it does! I don’t knew if this is fair, but you can read my rationale above.

Anyway, with this, we get results where the risk more than doubles with the speed, depending, of course, on the parameters that are fed in. Any thoughts? Admittedly, the notion of a relationship to the square of the speed is a bit of a kludge to make the model react how I want it to. But, in very tight spots, or panic, could it’s effect be realistic overall?

The diff patch is:
Code:
H:\vendor_bins\colsim>diff main.c.bk1 main.c
79a80,81
> double reaction_penalty;
>
248a251,256
>
>   // Get the speed based reaction time penalty
>   reaction_penalty = getprofiledbl("Settings", "Reaction Time Penalty");
>   printf("reaction time penalty -- %f\n",reaction_penalty );
>
>
372a381,387
>
>     // Speed-related reaction-time penalty
>     // Linear
>     // reaction_time[s] = reaction_time[s] * (1 + (reaction_penalty * vehicle_speed[s]));
>     // Square law
>     reaction_time[s] = reaction_time[s] * (1 + (vehicle_speed[s] * vehicle_speed[s] ) * reaction_penalty );
>

_________________
I stole this .sig


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 12, 2005 16:25 
Offline
Member
Member

Joined: Fri Apr 22, 2005 10:30
Posts: 2053
Location: South Wales (Roving all UK)
So you've introduced bias into the system?


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Fri Aug 12, 2005 17:19 
Offline
Banned
Banned

Joined: Thu Apr 15, 2004 12:47
Posts: 2291
civil engineer wrote:
So you've introduced bias into the system?



That's a good point, and exactly explains the feature. Bias is a systematic deviation of a value from a reference value. I have biased the reaction time at higher speeds to account for the risk of poorer judgements that result from trying to assess more data in less time. Thanks to Pete317’s clear style, it is simple to adapt his model to include greater risk without serious code changes.

_________________
I stole this .sig


Top
 Profile  
 
 Post subject: Re: Collision simulator
PostPosted: Fri Aug 12, 2005 18:09 
Offline
Life Member
Life Member

Joined: Sat Mar 27, 2004 13:50
Posts: 2643
basingwerk wrote:
We assume that, fast or slow, you become aware of an event at a similar distance from it.


What justification do you have for making such a wild assumption?
How do you know what distance you're going to be away when someone steps out from behind a van, for example? Or when a car pulls out from behind a wall? Or just about anything else? You could be 5 metres away or 50 metres away - or any other distance.
Just for the record - you're supposed to be able to read a numberplate from a distance of 22 metres, so if you can't see a pedestrian in the road from at least twaice that distance then you simply ain't looking (or legally blind)
My model is rooted in solid physics - there's nothing which biases it one way or another. If you wish to introduce a bias, by all means do so - but unless your bias is well-founded and quantifiable, then you're not likely to get anything worthwhile out of it.
As I see it, the one bias you can introduce which fits all those criteria is to introduce the time taken for the hazard to get to within the path of the vehicle. As I've said before, it just doesn't happen instantaneously - unless you ain't looking.

Quote:
Admittedly, the notion of a relationship to the square of the speed is a bit of a kludge to make the model react how I want it to. But, in very tight spots, or panic, could it’s effect be realistic overall?


If you have a solid rationale for doing so (which I cannot see) then by all means do it - but just remember the GIGO principle.

I would sincerely hope that your motivation is not to make the model react how you want it to, but rather to come to an understanding of why it reacts the way it does.

Cheers
Peter

_________________
Only when ideology, prejudice and dogma are set aside does the truth emerge - Kepler


Top
 Profile Send private message  
 
 Post subject: Re: Collision simulator
PostPosted: Sun Aug 14, 2005 11:04 
Offline
Banned
Banned

Joined: Thu Apr 15, 2004 12:47
Posts: 2291
Pete317 wrote:
basingwerk wrote:
We assume that, fast or slow, you become aware of an event at a similar distance from it.


What justification do you have


It happens every time me see any thing! Whenever you see a thing, you see it at a distance from it. If you are going fast, you see it. Also, if you are going slowly, you see the same thing in front of you at that time, because the same thing IS in front of you at that time!

Pete317 wrote:
My model is rooted in solid physics - there's nothing which biases it one way or another.


I know. It omits human factors (namely the inability to process too much information in a short time), and that is why I have changed it!

Pete317 wrote:
As I see it, the one bias you can introduce which fits all those criteria is to introduce the time taken for the hazard to get to within the path of the vehicle. As I've said before, it just doesn't happen instantaneously - unless you ain't looking.


No. The bias I have introduced models the factor you have ignored - the increased risk due to less time to think about a developing problem. If we want to understand a problem, we have to grapple with all of it, not just the parts that fit any case. No-one here would limit a model to just the parts that they can use to diminish speed limits, would they?

Pete317 wrote:
rather to come to an understanding of why it reacts the way it does.


Perhaps it works like you want it to because it does not model the reduced time to ponder a developing situation when you are going fast. This is a factor in driver error, and causes poor reaction times due to the delay. Your model is structured to statistically include real effects, with the patches I have given you. It is up to you if you want to ignore important factors.

_________________
I stole this .sig


Top
 Profile  
 
 Post subject: Re: Collision simulator
PostPosted: Sun Aug 14, 2005 12:55 
Offline
Life Member
Life Member

Joined: Sat Mar 27, 2004 13:50
Posts: 2643
basingwerk wrote:
It happens every time me see any thing! Whenever you see a thing, you see it at a distance from it. If you are going fast, you see it. Also, if you are going slowly, you see the same thing in front of you at that time, because the same thing IS in front of you at that time!


Define a distance. 10 metres, 50 metres, 100 metres? 1000 metres?
For comparison, 100 metres is roughly twice the distance between streetlights, so if you're adjacent to a streetlight, 100 metres is the distance to the second streetlight ahead. Can you see a pedestrian at that distance? Easily. At 30mph you will take 7.5 seconds to cover that distance - more than enough time to slow down without any fuss or bother. At 35mph it will take you 6.4 seconds - still plenty of time. At 40mph you have 5.6 seconds - you may just have to brake a wee bit harder now.
On the other hand, if the pedestrian darts out from in front of the van which you happen to be alongside at the time, you have no time at all to even think about doing anything.
But you cannot say or predict exactly (or even roughly) what distance you're going to be away from a pedestrian at the time that he/she steps/runs into the road. That is entirely down to circumstance and has absolutely nothing to do with your speed, thinking time, reaction time or anything else.

Quote:
It omits human factors (namely the inability to process too much information in a short time), and that is why I have changed it!


Your ability to process information is linked to time, not to speed.
Even so, the differences in time are minimal for the speed ranges we're considering (for example, 30/35mph)
I'll concede that perhaps our ability to process information is tied to the rate at which new information becomes available - for example, if we can only process information in, say, 100ms 'chunks', then there may be up to a 100ms hiatus from when an event happens to when we become aware of it. And then this could be related to speed - in that more things flash through our field of vision in a given space of time, but the effect of the number and spacing of things there are to process (parked cars, road signs etc etc) will have a far greater effect than a small change in speed.
This is one of the effects which can be accurately modelled - even though we don't know exactly what the parameters are, we can at least define their relationship.
I only have issue with things for which you cannot define a relationship. It's all very well saying that such or such a parameter ought to have some effect, and that it's worthwhile exploring, but if you don't know the relationship, ie you don't even know whether to add, subtract, multiply, divide or square, then the whole thing becomes an exercise in futility.

Besides anything else, if you want to start modelling human effects then you have to define all of them which are important, and model all of these in a well-defined fashion - and only then will you be in a position to start exploring what effect a change in parameters would have.
For example, you also have to model the effect of drivers seeing potential hazards from a good distance ( say > 100 metres) and slowing down in good time.
My physical model gives what amounts to the worst-case - most human factors would tend to mitigate the figures, which is why we don't see hundreds of pedestrians run down in each and every village every day - which is what the physical model appears to suggest.

Quote:
No-one here would limit a model to just the parts that they can use to diminish speed limits, would they?


No, and, equally, no-one would limit the model to just the parts that they can use to exaggerate the effects of speed limits, would they?

Cheers
Peter

_________________
Only when ideology, prejudice and dogma are set aside does the truth emerge - Kepler


Top
 Profile Send private message  
 
 Post subject: Re: Collision simulator
PostPosted: Sun Aug 14, 2005 13:32 
Offline
Banned
Banned

Joined: Thu Apr 15, 2004 12:47
Posts: 2291
Pete317 wrote:
Define a distance. 10 metres, 50 metres, 100 metres? 1000 metres?


Why should I? Whatever the distance to the object or event, you see it at the same time whether you are going fast or slow. Even a hard case Safe Speeder cannot say that going faster improves your sight. And if you like pure physics, you know that if you see something when you are going fast, you have less time to consider what to do than if you are going slowly.

Quote:
It omits human factors (namely the inability to process too much information in a short time), and that is why I have changed it!


Quote:
Your ability to process information is linked to time, not to speed.


And your speed is linked to time, so our knowledge of pure physics tells that our ability to process information is linked to speed via time!

Quote:
Besides anything else, if you want to start modelling human effects then you have to define all of them which are important, and model all of these in a well-defined fashion - and only then will you be in a position to start exploring what effect a change in parameters would have.


Yes, Perhaps we can we agree that your model (good as it is) is less useful for assessing true HUMAN risk until we have explored that? After all, what a person should do (and actually does) when he gets information is critically important, and is greatly influenced by time/speed?

_________________
I stole this .sig


Top
 Profile  
 
 Post subject: Re: Collision simulator
PostPosted: Sun Aug 14, 2005 14:12 
Offline
Life Member
Life Member

Joined: Sat Mar 27, 2004 13:50
Posts: 2643
basingwerk wrote:
Whatever the distance to the object or event, you see it at the same time whether you are going fast or slow.


That's nonsense - for the simple reason that if your speed is different then you're not going to be at the same position on the road at the time that the hazard appears. A quick examination of the physical data that the simulation produces will confirm that.

If you're convinced that such a relationship does exist, then define it in the form of an equation - and then we can examine it to see whether or not it's valid.

Cheers
Peter

_________________
Only when ideology, prejudice and dogma are set aside does the truth emerge - Kepler


Top
 Profile Send private message  
 
 Post subject: Re: Collision simulator
PostPosted: Sun Aug 14, 2005 14:59 
Offline
Site Admin
User avatar

Joined: Sat Mar 06, 2004 06:46
Posts: 16903
Location: Safe Speed
basingwerk wrote:
Yes, Perhaps we can we agree that your model (good as it is) is less useful for assessing true HUMAN risk until we have explored that? After all, what a person should do (and actually does) when he gets information is critically important, and is greatly influenced by time/speed?


If you wish to model human factors, then all my work indicates that by far the largest human factor is 'safe speed behaviour'. (i.e. slowing down in areas of danger or elevated risk.) At its simplest we would say that the frequency of speeding is far less at times and in places where crashes actually take place.

Real cars aren't like bowling balls looking for skittles - each has an intelligent (relatively) driver trying not to crash and by and large they are very successful at it. With 32 million drivers and 214,000 injury crashes in 2003 (and assuming that 1 driver caused each crash) the average driver goes 150 years between causing injury crashes.

_________________
Paul Smith
Our scrap speed cameras petition got over 28,000 sigs
The Safe Speed campaign demands a return to intelligent road safety


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Sun Aug 14, 2005 15:25 
Offline
Life Member
Life Member

Joined: Sat Mar 27, 2004 13:50
Posts: 2643
I agree.

But, before you can even begin to start modelling human factors in any sort of meaningful way, it's necessary to fully understand the underlying physics.
This is what I intended my model to facilitate, and why I deliberately kept it in the physical domain, and as simple as possible.
As such, it simulates the worst-case scenarios - and adding human factors would mainly tend to mitigate its results.
But even as it is, it demonstrates the failures of so-called mainstream research, which - I hasten to add - also principally deals with the purely physical factors.

Cheers
Peter

_________________
Only when ideology, prejudice and dogma are set aside does the truth emerge - Kepler


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Sun Aug 14, 2005 15:33 
Offline
Site Admin
User avatar

Joined: Sat Mar 06, 2004 06:46
Posts: 16903
Location: Safe Speed
Pete317 wrote:
I agree.

But, before you can even begin to start modelling human factors in any sort of meaningful way, it's necessary to fully understand the underlying physics.
This is what I intended my model to facilitate, and why I deliberately kept it in the physical domain, and as simple as possible.
As such, it simulates the worst-case scenarios - and adding human factors would mainly tend to mitigate its results.
But even as it is, it demonstrates the failures of so-called mainstream research, which - I hasten to add - also principally deals with the purely physical factors.


Quite... My remarks were exclusively directed towards Basingwerk's 'human factors' comments.

But I would dearly love to have a comprehensive and realistic human factors model... Perhaps that would be a better use for those climate simulator super computers? :)

(Although, seriously, I don't estimate that we would need super computer power - I'm quite sure we could get reasonable in a couple of thousand lines of code.)

_________________
Paul Smith
Our scrap speed cameras petition got over 28,000 sigs
The Safe Speed campaign demands a return to intelligent road safety


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Sun Aug 14, 2005 15:42 
Offline
Life Member
Life Member

Joined: Sat Mar 27, 2004 13:50
Posts: 2643
We can build it up incrementally.
Small steps, adding things as and when we become able to define them.
Eventually, we should have something very useful.
It's just important to fully understand the process at every step - especially in the beginning, as small errors tend to be magnified as the system becomes more complex.

Cheers
Peter

_________________
Only when ideology, prejudice and dogma are set aside does the truth emerge - Kepler


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Sun Aug 14, 2005 16:17 
Offline
Gold Member
Gold Member

Joined: Sun Feb 06, 2005 19:14
Posts: 410
Pete317 wrote:
As such, it simulates the worst-case scenarios - and adding human factors would mainly tend to mitigate its results.

What you have to be careful of, though, is that the response properties of this worst case scenario might not be correct, i.e. it might be worst case by a varying amount compared to reality when looking at different speeds and reaction times. So you can't necessarily conclude from your model that the risk at x mph is y times greater than the risk at z mph.


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Sun Aug 14, 2005 16:49 
Offline
Life Member
Life Member

Joined: Sat Mar 27, 2004 13:50
Posts: 2643
It is worst-case in the sense that the accident rate the model produces is orders of magnitude higher than the real-life accident rate along a similar section of road. The real-life accident rate is mitigated by mainly human factors - which are not yet factored into the simulation.

Cheers
Peter

_________________
Only when ideology, prejudice and dogma are set aside does the truth emerge - Kepler


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Mon Aug 15, 2005 17:36 
Offline
Banned
Banned

Joined: Thu Apr 15, 2004 12:47
Posts: 2291
SafeSpeed wrote:
I'm quite sure we could get reasonable in a couple of thousand lines of code.)


Don't be soft - we can do it in one line of code. Risk is propertional to speed squared!

_________________
I stole this .sig


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 15, 2005 18:00 
Offline
Site Admin
User avatar

Joined: Sat Mar 06, 2004 06:46
Posts: 16903
Location: Safe Speed
basingwerk wrote:
SafeSpeed wrote:
I'm quite sure we could get reasonable in a couple of thousand lines of code.)


Don't be soft - we can do it in one line of code. Risk is propertional to speed squared!


You are joking? Right? If not, that's about the stupidest thing you ever posted.

_________________
Paul Smith
Our scrap speed cameras petition got over 28,000 sigs
The Safe Speed campaign demands a return to intelligent road safety


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Mon Aug 15, 2005 19:16 
Offline
Life Member
Life Member

Joined: Sat Mar 27, 2004 13:50
Posts: 2643
basingwerk wrote:
Don't be soft - we can do it in one line of code. Risk is propertional to speed squared!


Out of idle curiosity - just how did you get a job?
They must really be scraping the barrel in your part of the world.

Sorry about the ad hominem, Paul - I consider myself warned.

_________________
Only when ideology, prejudice and dogma are set aside does the truth emerge - Kepler


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Tue Aug 16, 2005 12:47 
Offline
Banned
Banned

Joined: Thu Apr 15, 2004 12:47
Posts: 2291
Pete317 wrote:
Sorry about the ad hominem


No problem, Pete317. It's a good job I know you because it makes you look like a guttersnipe.

_________________
I stole this .sig


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 16, 2005 12:52 
Offline
Banned
Banned

Joined: Thu Apr 15, 2004 12:47
Posts: 2291
SafeSpeed wrote:
You are joking? Right? If not, that's about the stupidest thing you ever posted.


Perhaps there is a little bit of fun there, SafeSpeed, but it is a simple equation based on your expressed philosophy that, above a certain speed, crashing becomes a certainty! If there is anyone being stupid, it is the boneheads who do not support speed limits and dish out dirt on people who do! Get with the programme, can’t you?

_________________
I stole this .sig


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 54 posts ]  Go to page 1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You can post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
[ Time : 0.022s | 11 Queries | GZIP : Off ]