function Is_Free = Is_Avilable(Time, Node_From, Node_To,user) global Distance global Visiting_Time global ICDM global T_max Time_Reached = Time + Distance(Node_From, Node_To); Is_Free = false if Time_Reached >= T_max return; end counter = 0; while true if counter < Visiting_Time(Node_To) if Time_Reached + counter <= T_max index = int16(fix(Time_Reached + counter)); if index == 0 index = 1; end if ICDM(index,Node_To,user) > 0 Is_Free = true; counter = counter + 1; else Is_Free = false; return; end else Is_Free = false; return; end else break; end end end