Click to See Complete Forum and Search --> : LP programing
sahar_soltani
Apr 7th, 2008, 01:59 AM
thanks
NickThissen
Apr 7th, 2008, 02:31 PM
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.
sahar_soltani
Apr 7th, 2008, 10:59 PM
Nick Thanks for your answer. Would you mind a little explain more, please. I really need to solve this problem, but I don’t know how.
Thanks
jemidiah
Apr 8th, 2008, 04:33 AM
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.
sahar_soltani
Apr 8th, 2008, 10:37 PM
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?
Thanks,
MaximilianMayrhofer
Apr 8th, 2008, 11:37 PM
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?
sahar_soltani
Apr 8th, 2008, 11:50 PM
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,
MaximilianMayrhofer
Apr 9th, 2008, 12:49 AM
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:
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:
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.
63440
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:
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.
sahar_soltani
Apr 10th, 2008, 07:36 PM
Thank you so much.
MaximilianMayrhofer
Apr 10th, 2008, 08:58 PM
WRONG ANSWER. IN THE PROCESS OF CORRECTING
Basically, you are talking about something like this:
63477
This question is not too difficult really. You want to maximise the total flow of commodities.
The flow equation of Commodity 1 (call it C1) from N1 is as follows:
C1N1 = C1N1a + C1N1c + C1N1d
And the flow equation from N2 is:
C1N2 = C1N2a + C1N2b + C1N2e
While the flow equation of Commodity 2 (C2) from N4 is:
C2 = C2d + C2e + C2f
Hence the total flow of commodities can be written as such:
CTotal = (C1N1a + C1N2a) + C1N2b + C1N1c + (C1N1d + C2d) + (C1N2e + C2e) + C2f
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.