# How to decide to write an objective function?

I'm working on this problem:

In the Njaba river basin, the available water was allocated for the purposes of consumption, irrigation, and electric power supply among three communities. The water allocated per annum per capita for all use in these communities are $$10m^3$$, $$10m^3$$ and $$30m^3$$ . The allocations were made based on the critical factors of population, land area and the industrialization. The populations of the communities are 300, 200, and 100, power supply capacities are 20W, 10W and 20W while the land areas for irrigation are 50 hectares, 40 hectares, and 30 hectares respectively. Allowable allocations limits of more than 300, 100 and 80 were stipulated for the purposes. Using the above information, formulate, (a) Linear Programming Model for the basin. (b) Maximization the allocations made Assume non-negativity condition?

I'm taking this course for the very first time, so in order to understand this subject and its problems, I'm trying to solve different problems.

This is a solved example I found on the internet. From the solution, here are the objective function and constraints.

Let the three communities be denoted by the variables $$x$$, $$y$$, and $$z$$. The objective function should be based on the allocation per annum, per capita for the basin as stated;

$$Z = 10x + 10y + 30z$$

The constraints can be formulated thus;

$$300x + 200y + 100z \ge 300$$ $$20x + 10y + 20z \ge 100$$ $$50x + 40y + 30z \ge 80$$

Under the negativity conditions of

$$x, y, z \ge 0$$

My confusion is writing an objecting function in this question. When different communities are supplied water for different use then it's obvious that usage of water in every community for different use is different. Like annually, per person usage of water would be different. If a person is using water only for domestic needs the whole year, they have nothing to do with the irrigation and electric power supply, so how could the following line be justified?

The water allocated per annum per capita for all use in these communities are $$10m^3$$, $$10m^3$$ and $$30m^3$$ ?

Does this mean every single person is allocated water for all uses like for basic consumption, irrigation, electric power supply or it means they're providing extra water?

• To help out new users, downvoters should feel free to post a comment indicating why they downvoted and what can be done to improve the question. I'm not in any way arguing in favor of or against the question, just suggesting that some feedback from voters would be useful. Jun 4 '19 at 16:25
• Just for the record (...and thanks for pointing this out, @Michael Trick) -- this, actually, is an "example problem" posed in this paper -- make of it whatever you want. Jun 6 '19 at 18:13

I’m not sure Ehsan is correct. I think the coefficients in the given objective function (10, 10, 30) are the annual allocations. Yet it also states you’re supposed to maximize the allocations and the decision variables are the communities. This seems like the problem contradicts itself. It also appears to be unbounded above (unless it’s a min)? I could be misreading it though, perhaps someone can clarify.

Minor - the inequalities also shouldn’t be strict for a linear program.

Evan, if you’re trying to learn how to formulate linear programs, I’d recommend you find a different source for example problems. You can ask another question on this site, and folks can recommend them.

• Also - welcome to OR.SE! We’re glad you’re here. Jun 4 '19 at 13:42
• @Emily: Although, the first sentence of the solution says that "Let the three communities be denoted by the variables $x$, $y$, and $z$ " but in fact, it meant to be for the basin of each community (as stated in the second sentence). With that in mind, I don't think what I said was wrong. I couldn't edit the question as another edit has been waiting to be reviewed!
– EhsanK
Jun 4 '19 at 14:04
• As a note, if the example solution is wrong or unclear, I don’t think it should be edited, rather I think the takeaway is the example is bad. Also my interpretation of the question is that the allocation is pregiven but also asked for - which seems to be a different interpretation than you take. (I certainly may be wrong again haven’t spent much time on this, but I’m not persuaded by your response.) Thanks for your comment. Jun 4 '19 at 15:00
• In that case, I agree. This is not a good problem definition with wrong (Max) objective function and there are lots of better references to learn the subject such as some of the books discussed here. PS: I found the OP's problem description in the pdf file here on page 8 which has lots of mistakes in the solution too.
– EhsanK
Jun 4 '19 at 15:15
• It is shocking that a journal would publish that. The problem is incoherent and I feel bad that @EvanPk is wasting time on it. Issues begin with the definition of variables: let $x,y,z$ be the what for each of the communities? Water allocation? But that appears as a coefficient in the objective. I can make no sense of the problem being solved. Jun 5 '19 at 16:04

I think you are reading too much into the question and its details. The water is allocated based on the overall use of the community as is mentioned in the sentence right after that.

The allocations were made based on the critical factors of population, land area and the industrialization.

So, think of it as a strategic decision that just tries to figure out the allocation to each community and doesn't bother about the "fair share" for each person per year. That'd be another problem!

• okay, but when I'm solving it using TORA, the result is unbounded. Jun 4 '19 at 15:50
• @EvanPk The reason as Emily said is that the objective function, mistakenly I assume, is maximization. So, you want to maximize sum of three variables and all your constraints are $\ge$. So, nothing stops you from increasing any of the variables. So, either your objective function should be $\min$ or at least one of the constraints be $\le$ to limit your resources.
– EhsanK
Jun 4 '19 at 15:55
• thanks a lot for this. Jun 4 '19 at 15:58