The idea is that all lines add up to the total minutes entered in any possible way because in the end they'll share the minutes. 1 line at 10,000 minutes would fail because there are no plans of that size. Priority is on cost, not so much on minutes. For example if you entered 9100 minutes and 10 lines the solution would return 9200 minutes. I'll have to get the exact plans/minutes on Tuesday to provide the solution. And if multiple options add up to the same cost then yeah, one at random would work because it meets the requirements.
Thanks! On Sun, Sep 6, 2009 at 8:43 AM, <[email protected]> wrote: > > I couldn't stop thinking about this last night so I wrote a SQL solution > that appears work based off some assumptions I made about the questions > I posed. > SQL can be handy for brute forcing since Cartesian products represent > all possible combination of 2 or more vectors. That, and SQL Server > handles lots of rows easily. > > It actually performs decent considering the millions of possible > combination you can quickly rack up. Let me know how you handle the > scenarios I asked about and I'll show you the code for a starting point. > Actually, I might just paste it in a blog entry since it's kind of > messy to paste all that SQL here. > > ~Brad > > -------- Original Message -------- > Subject: RE: getting min value based on inputs > From: [email protected] > Date: Sat, September 05, 2009 10:50 pm > To: cf-talk <[email protected]> > > > We can help you come up with an algorithm, but first some questions. > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326052 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

