I haven't really read it through (too tired) but since it asks you to find an optimal result you should try looking into differentiation, which is usually used to find optimal or minimum results.
From the problem you seem to be balancing initial setup costs for whatever beam(s) you decide to manufacture against a later loss based on the demand for weaker beams. I could algebraically write it out, but I don't see how I could optimize the problem (unfortunately).... Perhaps you could start by arbitrarily choosing to manufacture "g" different beam strengths, and check their effects on final prices, but you have a huge number of possibilities to check through that way. I'm sure there's a better way, but I don't know it.
The time you enjoy wasting is not wasted time. Bertrand Russell
Jemidiah Thanks. I know that it could be solve with “ shortest route network” , but I can’t still solve it. Do you have any idea about that? Would you mind write the solution if you find it?
You seem to use j and k interchangeably. Which is confusing in the later part of the question. Can we assume that j is always the strength of beam that the company produces, while k is always the strength demanded?
- VS2008 Express, Access, SQL Server 2005 Express, VB/C#/ADO.NET -
Rate posts that have been helpful to you! It's a way of giving back to someone who has helped you
You seem to use j and k interchangeably. Which is confusing in the later part of the question. Can we assume that j is always the strength of beam that the company produces, while k is always the strength demanded?
Yes, I think we need to assume that.
Do you have the solution? Please, help.Thanks,
I think sahar, that you are misinterpreting the question slightly. Think about it this way:
Let us say that the company is already manufacturing a beam of strength k, where k <= j. Now, they can satisfy demand for j by simply producing more k, in which case they will incur a loss of h*[w(k)-w(j)] for each beam sold, on top of the cost per beam: h*w(k). So if they were to simply produce k to satisfy demand, the total cost to the company would be:
Code:
Ck = h*w(k)*D(j) + h*[w(k)-w(j)]*D(j)
= h*[2*w(k) - w(j)]*D(j)
On the other hand if they were to overhaul production to make beams of strength j, they would incur a setup cost s(j) as well as the cost for producing each beam: h*w(j). So if they were to satisfy demand by producing only strength j, their total cost would be:
Code:
Cj = s(j) + h*w(j)*D(j)
It is easy to see that Ck is related to whatever strength k is being produced. However, mathematically, since k <= j, we know that [2*w(k) - w(j)] is always greater than w(j), so the two equations can be represented graphically as shown in the picture.
You will notice that there is an equilibrium demand De(j), below which it makes no sense to produce any j beams, because it is obviously cheaper to keep supplying k beams. This is the first thing you model will test for, whether demand D(j), based on k, j, h, and s(j) is less than the De(j). If not, then we move on to this:
D(j) = xj + xk, where xj is the number of j beams produced, and xk the number of k beams.
The cost of producing D(j) under these circumstances is the combined cost of the two LPs:
Code:
C = s(j) + h*w(j)*xj + h*[2*w(k) - w(j)]*xk
since s(j), h, w(j) and w(k) are all arbitrary constants, C will basically depend on xj and xk.
What you then need to do is loop through all of the values of xj from 0 to D(j) along with the corresponding xk value (remember, xj + xk = D(j)) and calculate C. You will then be able to find the lowest C based on the above.
Seeing as how the the graph above represents total cost for each value of D(j), it is pretty obvious that you should simply produce k-beams if D(j) <= De(j), and j-beams if D(j) > De(j). In case you aren't convinced by this logic, I wrote an iterative program that really does test every value. Attached as well.
Last edited by MaximilianMayrhofer; Apr 9th, 2008 at 05:32 AM.
- VS2008 Express, Access, SQL Server 2005 Express, VB/C#/ADO.NET -
Rate posts that have been helpful to you! It's a way of giving back to someone who has helped you
The following conditions can be gleamed from the total flow statement itself:
C1N1a + C1N2a <= ba
C1N2b <= bb
C1N1c <= bc
C1N1d + C2d <= bd
C1N2e + C2e <= be
C2f <= bf
There are more conditions that can be constructed based on our knowledge of a flow. Consider each node as a fork in a stream. The sum of the volumes of water leaving each fork are always equal to the volume of water entering the fork (Otherwise water would either build up and overflow, or would eventually run out! Obviously not a logical possibility). This results in several obvious limitations on flow rates, based on the capacities of each path. So, using the nodes, we can extract these further conditions:
C1N1a + C1N2a <= bb + be
C1N1a + C1N2a <= bc + bd
C1N2b <= ba + be
C1N2b <= bc + bf
C1N1c <= ba + bd
C1N1c <= bb + bf
C1N1d + C2d <= ba + bc
C1N1d + C2d <= be + bf
C1N2e + C2e <= ba + bb
C1N2e + C2e <= bd + bf
C2f <= bb + bc
C2f <= bd + be
After that it's just a matter of looping through the possible values of the above variables to find the largest possible CTotal without violating any of the conditions.
Last edited by MaximilianMayrhofer; Apr 12th, 2008 at 05:54 AM.
- VS2008 Express, Access, SQL Server 2005 Express, VB/C#/ADO.NET -
Rate posts that have been helpful to you! It's a way of giving back to someone who has helped you