Need equation for assignment

I need an equation that determines the lowest possible cost for laying power line.

The variables are as follows:

1. The width of a river
2. The distance a factory is downstream from a station on the other side of the river.
3. The cost for laying line underwater.
4. The cost for laying line on land.

All these variables will be user input each use of program.
You'll need to multiply the width of the river by the cost of the water work and sum that with the distance of the factory multiplide the cost of the land work:

Wr = Width of the river
Fd = Factory distance
Cu = cost of laying cable underwater
Cl = cost of laying cable on land
Ct = total cost

Ct = (Wr * Cu) + (Fd * Cl);

Yes I understand that portion of the problem. I think I didn't clarify well enough.

there are two other variables:

The length of line underwater and the length of line on land. I need an equation that would determine the lowest possible total cost by manipulating these two variables.

So in other words Lenw doesnt have to = Wr and LenL doesn't have to = Fd
You need to minimise the more expensive patch, unless different routes have different LenW+LenL.
I would imagine that the shortest length across the river is a path that is perpendicular to the direction of the flow of water. Laying line in any other fashion increases cost of probably the most expensive part of the project.

Besides, Wr doesn't necessarily need to equal the width; it could just mean the distance of underwater layage.
Topic archived. No new replies allowed.