Mathematical programming in subsistence agriculture