A construction for automatically milking animals, such as cows, comprising a shed having a milking parlor with a milking robot and an area having regions where animals to be milked and have been milked can freely move about, said area where the animals can move freely including a system of one-way portals, the construction further comprising an outdoor enclosure where the animals can graze, said s