# Tree Harvesting Linear Programming Problem

### Tree Harvesting Linear Programming Problem

The State of Virginia is one of the largest produces of wood furniture in the United States, with the furniture industry accounting for 50% of value added to wood materials. Over the past 40 years the inventory volume of wood in Virginia’s forests has increased by 81%. Today, 15.4 million acres, which is well over half of the state, are covered in forest. Private owners hold 77% of this land. When making decisions about which trees to harvest, forestry professionals consider many factors and must follow numerous laws and regulations.
The figure below depicts a tract of forested land that has been sectioned off into 16 harvestable areas, indicated by dashed lines. Area E provides the only access to the forest via a paved road, so any timber cut ultimately must be transported out of the forest through Area E. Currently, there are no roads through this forest. So to harvest the timber, forest roads must be built. The allowable routes for these roads are also shown in the figure below. They are determined largely by the geography of the land and by the location of streams and wildlife habitat.
Not all areas of the forest have to be harvested. However, to harvest any area, a forest road must be built to that area. The cost of building each section of forest road (in $1000s) is indicated in the figure. Also, note that road connecting G->K or K->G costs the same,$12,000. Finally, the value of the harvestable timber in each area is estimated as follows:

Harvested Value (in $1000s) Area A B C D E F G H I J K L M N O P Value$13 $7$17 $19$8 $13$17 $18$13 $13$10 $20$8 $16$13 \$9

The diagram is listed below. I really need help on formulating this in LINDO
Attachments
Prob10 (1).doc
(41 KiB) Downloaded 336 times
Titansguy2121

Posts: 1
Joined: Mon Mar 10, 2014 10:59 am
Reputation: 0

### Re: Tree Harvesting Linear Programming Problem

Presumably you want to maximize your profits. This is an integer programming problem as you have binary variables (variables that can either be 0 or 1) you want to determine like whether to build a road or not.

I would choose to have a binary variable for whether each road is built or not, and a binary variable for whether each area is reachable or not. This makes the objective function nice and linear. The constraints are given by the fact that whether an area is reachable or not depends on whether it's neighbouring areas are reachable and whether there is a road from such a neighbour.

As an example let:
$$v_G$$ = area G is reachable
$$v_F$$ = area F is reachable
$$v_K$$ = area K is reachable
$$r_{FG}$$ = road from F to G is built
$$r_{KG}$$ = road from K to G is built
be binary variables, then $$v_G$$ is clearly constrained by
$$v_G$$ = ($$v_F$$ AND $$r_{FG}$$) OR ($$v_K$$ AND $$r_{KG}$$)
where "OR" and "AND" are binary operators. Unfortunately this statement isn't linear, so we need to fix it.

We can replace "AND" with multiplications e.g.
$$x$$ AND $$y$$ AND $$z$$ = $$xyz$$
We can replace "OR" with multiplications and additions e.g.
$$x$$ OR $$y$$ OR $$z$$ = $$1-(1-x)(1-y)(1-z) = x+y+z-xy-xz-yz+xyz$$
we can replace a product of variables with an auxiliary binary variable, e.g. the set of linear constraints for the binary variable $$a$$
$$a \leq x$$
$$a \leq y$$
$$a \leq z$$
$$a \geq x+y+z-2$$
are equivalent to saying $$a=xyz$$.

Using these tricks you can convert the constraints into proper linear constraints.

Hope this helped,

R. Baber.
Guest

### Re: Tree Harvesting Linear Programming Problem

Sorry, I should have also added that you should add constraints that say that there are no circular paths, e.g.
$$r_{JK}$$ AND $$r_{KO}$$ AND $$r_{ON}$$ AND $$r_{NJ}$$ = 0.

R. Baber.
Guest

### Re: Tree Harvesting Linear Programming Problem

Apologies again, that still doesn't get rid of the problem of an isolated area thinking it is connected to region E (for example suppose only road AB is built then $$v_A=v_B=1$$ satisfies the constraints but is not what we intended).

What you need is two variables per road, e.g. $$r_{AB}$$ and $$r_{BA}$$, where
$$r_{AB}$$ = Timber in region A can get out by going through B,
$$r_{BA}$$ = Timber in region B can get out by going through A,
and an extra constraint that says $$r_{AB}$$ AND $$r_{BA}$$ = 0 (the route timber takes to get out never goes back on itself). You still need constraints that forbid cycles as well.

R. Baber.
Guest

### Re: Tree Harvesting Linear Programming Problem

I have the same problem in a linear programming class I am taking. I am having a hard time determining the OBJ Function. I understand the networking aspect moving grid to grid maximizing profit of harvesting each grid while keeping road cost at a minimum.

I get the constraints to keep from building the same road twice
ex) KJ +JK <=1
KG-JK-KL-FG<=0

I am going with combining cost & profit to approach this problem; would the OBJ Func. be where I combine this?
MAX 4BA-2BC....
Guest

### Re: Tree Harvesting Linear Programming Problem

The objective function would be something like:
Maximize $$13v_A -9 r_{AB} -9 r_{BA}$$... etc.
where 13 is the money made from harvesting $$A$$ and 9 is the cost of building a road between $$A$$ and $$B$$.

R. Baber.
Guest

### Re: Tree Harvesting Linear Programming Problem

I think you are using a different program from Lindo. I need assistance with formulating it in Lindo. I'm trying to translate it but it is kind of difficult. Thanks for the help though it's really appreciated!
Guest

### Re: Tree Harvesting Linear Programming Problem

Guest wrote:I have the same problem in a linear programming class I am taking. I am having a hard time determining the OBJ Function. I understand the networking aspect moving grid to grid maximizing profit of harvesting each grid while keeping road cost at a minimum.

I get the constraints to keep from building the same road twice
ex) KJ +JK <=1
KG-JK-KL-FG<=0

I am going with combining cost & profit to approach this problem; would the OBJ Func. be where I combine this?
MAX 4BA-2BC....

I thought the objective function would look something like this. MAX 4BA + 2BC + 7FB + 8HD - 2EF + 4FG + 6GH + 0EI + 1IJ - 3JK + 10KL + 0IM + 0JN + 5NO + 0KO + 0LP

but I could be totally wrong
Guest

### Re: Tree Harvesting Linear Programming Problem

Guest wrote:I think you are using a different program from Lindo. I need assistance with formulating it in Lindo. I'm trying to translate it but it is kind of difficult. Thanks for the help though it's really appreciated!

I'm not actually using any program. From my understanding of LINDO it can accept anything that looks like a linear program (e.g. expressions that look like $$4x+y+6z \leq 2$$ but not things like $$xy=1$$ as $$xy$$ is a non-linear term). It also allows constraints on the types of variables, like $$x$$ must be 0 or 1, which I think LINDO specifies with the "INT" keyword. Problems of this form are more generally known as integer programming problems and there are well known ways of converting expressions such as $$x$$ AND $$y$$=0 (which is a more natural way of phrasing constraints in the problem you're trying to solve) into linear constraints which integer programming solvers like LINDO prefer. All I was trying to do was point out how such conversions work, unfortunately you still have to do a lot of the work yourself, as LINDO won't do this conversion for you (and neither will I ). Good luck with translating the problem,

R. Baber.
Guest

### Re: Tree Harvesting Linear Programming Problem

Guest wrote:I thought the objective function would look something like this. MAX 4BA + 2BC + 7FB + 8HD - 2EF + 4FG + 6GH + 0EI + 1IJ - 3JK + 10KL + 0IM + 0JN + 5NO + 0KO + 0LP

but I could be totally wrong

You are combining the road cost with the harvesting profit. This is fine for roads like H to D as the only point of building such a road would be to harvest D. However, what about road G to K was the road built to harvest G or to harvest K, when you write the coefficient of GK in your objective function what should you put? Both scenarios are possible. I get around this by having a separate variable for whether an area is harvested.

R. Baber.
Guest

### Re: Tree Harvesting Linear Programming Problem

MAX 8E-2EF+2BC+4FG+8HD+0EI-3JK-2GK+10KL+0LP+0IM+0JN+5NO-3OK-3NJ+0KO+4BA-7FB-5IE+0GF+8ON+5KG+0KJ-7FE+6GH+1JI
SUBJECT TO
2) BA-FB<=0
3) BC-FB<=0
4) HD-GH<=0
5) GH-GK-FG<=0
6) FG-EF-KG<=0
7) EF-E-EI<=0
IM-EI-IJ<=0
9) KG-JK-KL-FG<=0
10) LP-KL<=0
11) OK-JK-KL-NO<=0
12) JN-IJ-JK<=0
13) NO-JN-LK<=0
14) ON-KO-JN<=0
15) EI+IE<=1
16) FG+GF<=1
17) JI+IJ<=1
18) OK+KO<=1
19) JN+NJ<=1
20) ON+NO<=1
21) GK+KG<=1
22) JK+KJ<=1
23) GH+HG<=1
24) E<=1
25) GK-FG<=0
26) JI-KJ-EI<=0
27) KL+LK<=1
28) EF-EI<=0
29) BF+FB<=1
END

This keeps giving me an optimal solution of 50 but the answer is 53. And all my roads don't connect. I'm missing something.
Guest

### Re: Tree Harvesting Linear Programming Problem

Sorry the answer is 43
Guest

### Re: Tree Harvesting Linear Programming Problem

I didn't want to do this, but here is an integer program that works.

Maximize 8-2AB+4BA+2BC-8CB-1BF-7FB+8HD+7DH-2EF-7FE+4FG+0GF+6GH+5HG+0EI-5IE+5KG-2GK+1IJ+1JI-3JK+0KJ+10KL+0LK+5MI+0IM-3NJ+0JN-3OK+0KO+0LP+11PL+5NO+8ON

Such that:

There are no loops:
AB+BA<=1
BC+CB<=1
BF+FB<=1
HD+DH<=1
EF+FE<=1
FG+GF<=1
GH+HG<=1
EI+IE<=1
KG+GK<=1
IJ+JI<=1
JK+KJ<=1
KL+LK<=1
MI+IM<=1
NJ+JN<=1
OK+KO<=1
LP+PL<=1
NO+ON<=1
EF+FG+GK+KJ+JI+IE<=5
EI+IJ+JK+KG+GF+FE<=5
JK+KO+ON+NJ<=3
JN+NO+OK+KJ<=3
EF+FG+GK+KO+ON+NJ+JI+IE<=7
EI+IJ+JN+NO+OK+KG+GF+FE<=7

The roads are connected:
AB<=0
BA<=FB+CB
BC<=AB+FB
CB<=0
BF<=AB+CB
FB<=EF+GF
HD<=GH
DH<=0
EF<=1
FE<=BF+GF
FG<=EF+BF
GF<=HG+KG
GH<=FG+KG
HG<=DH
EI<=1
IE<=MI+JI
KG<=LK+OK+JK
GK<=HG+FG
IJ<=EI+MI
JI<=KJ+NJ
JK<=IJ+NJ
KJ<=GK+LK+OK
KL<=GK+JK+OK
LK<=PL
MI<=0
IM<=EI+JI
NJ<=ON
JN<=IJ+KJ
OK<=NO
KO<=JK+GK+LK
LP<=KL
PL<=0
NO<=JN
ON<=KO

There aren't two routes to the same area:
BA<=1
AB+FB+CB<=1
BC<=1
HD<=1
FE+IE<=0
EF+BF+GF<=1
FG+KG+HG<=1
GH+DH<=1
EI+JI+MI<=1
IJ+NJ+KJ<=1
JK+GK+LK+OK<=1
KL+PL<=1
IM<=1
JN+ON<=1
NO+KO<=1
LP<=1

All variables are binary.

The optimal value for the objective function is 43, there are 8 solutions given by building roads:
HD, GH, EI, KG, IJ, JK, KL, KO, ON
and optionally building (any subset of)
GF, IM, LP.

Hope this helped,

R. Baber.
Guest

Return to Programming and Algorithms

### Who is online

Users browsing this forum: No registered users and 2 guests