We have one of the official Council composters and it is always alive with Ants. They seem to do a good job of munching up a lot of the green waste. One way to reduce them is to tip all the compost out and watch the birds eat all the eggs up but then you have a large pile of semi composted compost laying around.
medicine hat is right according to this - click here - so dousing with 'cold water' should encourage them to leave. Then again, they apparently help with the composting process if conditions are right for them, so the choice is yours it would seem. TC.