Aamit -7 Posting Whiz

I have 100 items and 10 vendors.
Vendors bid on that items like


Vendor1 Bid
Item quantity price Total Min-require
Item1 10 10 100 200
Item2 15 20 300
Item3 17 17 289
Item100 10 10 100

Vendor2 Bid
Item quantity price Total Min-require
Item1 10 12 120 300
Item2 15 18 270
Item3 17 16 272
Item100 10 10 100

I want to find solution with low cost and optimum value.
You are free to buy like buy 10 items from vendor1, 30 items vendor2 like this.
But you get the minimum cost and display it.

Also 1 main thing is suppose I am taking item1 from vendor1 - 100 rupee but it not satisfy min-requirement of vendor1 i.e. 200 > 100.
But I can buy item1 and item100 bcoz item1+item100=200 and satisfy min- requirement of vendor1 and lower cost than vendor2.

How to do this??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.