Adapt hriAgent to C++11 iterators