Continuous and discrete models for optimal harvesting in fisheries