Modeling endemic diseases: individual-based simulations with dynamic network of contacts