Any optimization problem has three main features: a behavioural decision, a currency, and constraints.
The many things that animals do can be broken down into a series of decisions: when to fight, when to mate, what food to search for, and so on. An optimally designed animal should make the right decisions. If an optimality modeller tackles all these decisions at once, his or her model will quickly get out of hand. So it's best to limit the model to a simple decision: should the animal stay in this patch or go? Is it worth waiting for a female to respond to my signal or should I save energy and stop signalling? This approach may be a little unrealistic, but complications can always be added later.
Ultimately, the benefit to the animal of solving a problem, in an evolutionary sense, is increased survival and reproductive success. But in order to do that, an animal must overcome a lot of subsidiary hurdles: eat enough food, find a mate, raise its young, and so on. The success of the animal in overcoming each of these hurdles ultimately translates into increased reproductive success, but we won't learn much about behaviour if we try to figure out how a hummingbird can sip a flower to best increase its reproductive success -- that result is too far removed from the action. Instead we must select measure of its immediate success, a currency, that is a stand-in for and will ultimately result in higher survival and reproductive success. In the patch model, as in most foraging models, the currency is the rate of energy gain -- the more energy you can get in a limited time, the greater your reproductive success.
In a perfect world, animals could just suck food and mates out of thin air. But the world isn't perfect; it presents animals with certain realities. The patch problem you're dealing with now, for example, presents two ubiquitous limits on our lives. First, the curve of diminishing returns is a reality in just about every sphere of life: whether you're a hummingbird sucking on a flower or a farmer harvesting a crop, eventually resources begin to run out. Second, resources are usually scattered across space; it takes a while to get from one flower to the next or to buy more seed and plant a new crop, and during that time you aren't earning any energy. So the diminishing gain curve and travel time are the two constraints of this optimality model.