![]() |
Excel Functions
Is there a way in Excel to produce results for the following problem:
Let's say I have a pipe to be installed that is 120 ft. long. There are three lengths of pipe that I can use 8', 6', and 4'. I want to know ALL of the possibilities for construction. Example: One solution would be (10) 8' pipes (4) 6' pipes, and (4) 4' pipes. I want to know ALL of the solutions. Thanks Chris P.S. I know how to find the optimal solution with the solver (ie. lowest cost) but still need to know all of the possibilities. |
There's no built-in way to do it. It would require a macro, and even there you
have a problem. I've written code to generate combinations (which you can find on Google), but it won't solve this problem because the number of pieces in the subset isn't fixed. You would have to run it multiple times, with multiple subset sizes, plus modify the code to not display combinations where the total length is less than 120. If you want a better idea of the complexity, you can take a look at my code. It's several pages long. On Thu, 10 Feb 2005 06:29:04 -0800, ChrisA wrote: Is there a way in Excel to produce results for the following problem: Let's say I have a pipe to be installed that is 120 ft. long. There are three lengths of pipe that I can use 8', 6', and 4'. I want to know ALL of the possibilities for construction. Example: One solution would be (10) 8' pipes (4) 6' pipes, and (4) 4' pipes. I want to know ALL of the solutions. Thanks Chris P.S. I know how to find the optimal solution with the solver (ie. lowest cost) but still need to know all of the possibilities. |
All times are GMT +1. The time now is 08:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com