Likely could've worked if - they had to pay to access health care and other benefits, plus they could only live inwards in places where the population is decreasing like Castelo Branco etc. And if the distortions in the real estate market became too big in any particular place, they would be banned from that district. That would cut down on work-tourist types who just come for the beach and sun, and it would contribute to actual de-desertification of the interior of the country.