public bool IsEmpty(ref ConnectionLength conLength)
 {
     return(EnterLength >= conLength.Length);
 }
 public void ClearConnection(ref ConnectionLength conLength)
 {
     EnterLength = conLength.Length;
 }
 public float NewAgentCoord(ref ConnectionLength conLength)
 {
     return(conLength.Length - EnterLength);
 }
 public void AgentLeaveThePack(ref Agent agent, ref ConnectionLength conLength)
 {
     ExitLength = math.min(ExitLength + agent.Length, conLength.Length);
 }
 public bool CouldAgentEnter(ref Agent agent, ref ConnectionLength conLength)
 {
     return(EnterLength >= agent.Length ||           //car fit
            EnterLength >= conLength.Length);                 //car is larger than the road & the road is empty
 }