Wednesday, November 4, 2015

Computer Graphics
Group 40 Documentation

A3: Social Forces
                         
Description:
 In this assignment, we implemented four important function for social forces - calcWallRepulsion, calcAgentRepulsion, calcGoalForce, and calcProximity.

We define social forces as forces that we exert on particles to drive them towards their destination while avoiding agents and obstacles. 

Each of these functions provides the components for the equation: 

social force = collision avoidance + non-penetration + sliding force

We treated walls as obstacles and other agents as agents and solved social force equations for each of these. For agents and walls, the collision avoidance component is considered the proximity force and the non-penetration component as the repulsion force. These are applied back into the social force equation, along with the calcGoalForce which directs the force for the goal destination. 

For each of the following test cases, we applied a scoring script that gave us the overall score for the scene.  

One Way Hallway: 

One Way Hallway Scores: 


total number of agents: 200
avg. number of collisions per agent: 0
    average time spent by one agent: 84.3662
  average energy spent by one agent: 1501.66
 sum of instantaneous accelerations: 9.28161
(alpha, beta, gamma, delta) weights: (50,1,1,1)
                       weighted sum: 50*0 + 1*84.3662 + 1*1501.66 + 1*9.28161 =
1595.31
                        final score: 1595.31


Two Way Hallway: 

Two Way Hallway Scores:
             
total number of agents: 200
avg. number of collisions per agent: 0
    average time spent by one agent: 73.5943
  average energy spent by one agent: 1213.45
 sum of instantaneous accelerations: 244.974
(alpha, beta, gamma, delta) weights: (50,1,1,1)
                       weighted sum: 50*0 + 1*73.5943 + 1*1213.45 + 1*244.974 = 1532.01
                        final score: 1532.01

Four Way Hallway: 


             
Four Way Hallway Scores: 


total number of agents: 400
avg. number of collisions per agent: 0.015
    average time spent by one agent: 83.8544
  average energy spent by one agent: 1291.23
 sum of instantaneous accelerations: 487.834
(alpha, beta, gamma, delta) weights: (50,1,1,1)
                       weighted sum: 50*0.015 + 1*83.8544 + 1*1291.23 + 1*487.833 = 1863.67
                        final score: 1863.67

Bottleneck Evacuation:



Bottleneck Evacuation Scores: 
            
total number of agents: 200
avg. number of collisions per agent: 6.115
    average time spent by one agent: 99.9456
  average energy spent by one agent: 1256.3
 sum of instantaneous accelerations: 2121.33
(alpha, beta, gamma, delta) weights: (50,1,1,1)
                       weighted sum: 50*6.115 + 1*99.9456 + 1*1256.3 + 1*2121.33 = 3783.32
                        final score: 3783.32


Here are some links to view the simulations! 

One Way Hallway: https://www.youtube.com/watch?v=LLyWknD17gk
Two Way Hallway: https://www.youtube.com/watch?v=3zrMY31haKI
Four Way Hallway: https://www.youtube.com/watch?v=JW5SpJrBHBI
Bottleneck Evacuation: https://www.youtube.com/watch?v=cIEwulbXuGU


No comments:

Post a Comment