Complex networks and agent-based models of HIV epidemic