views:

52

answers:

1

Hi,

I have a database of items. They are for cars and similar parts (eg cam/pistons) work better than others in different combinations (eg one product will work well with another, while another combination of 2 parts may not).

There are so many possible permutations, what solutions apply to this problem?

So far, I feel that these are possible approaches (Where I have question marks, something tells me these are solutions but I am not 100% confident they are).

Neural networks (?) Collection-based approach (selection of parts in a collection for cam, and likewise for pistons in another collection, all work well with each other) Business rules engine (?)

What are good ways to tackle this sort of problem?

Thanks

+1  A: 

The answer largely depends on how do you calculate 'works better'?

1) Independent values

Assuming that 'works better' function f of x combination of items x=(a,b,c,d,...) and(!) that there are no regularities that can be used to decide if f(x') is bigger or smaller then f(x) knowing only x, f(x) and x' (which could allow to find the xmax faster) you will have to calculate f for all combinations at least once.

Once you calculate it for all combinations you can sort. If you will need to look up data in a partitioned way, using SQL/RDBMS might be a good approach (for example, finding top 5 best solutions but without such and such part).

For extra points after calculating all of the results and storing them you could analyze them statistically and try to establish patterns

2) Dependent values

If you can establish some regularities (and maybe you can) regarding the values the search for the max value can be simplified and speeded up.

For example if you know that function that you try to maximize is linear combination of all the parameters then you could look into linear programming

If it is not...

Unreason
The problem with the SQL approach is that the db will be hit so heavily and especially as there are so many parts and combinations. The number of parts to compare can be more than 1 (eg cam, block, pistons).
dotnetdev
here is a rare case where you may actually denormalize to store a calculated value to achieve performance.
Randy
it does feel a bit like a linear programming effort. (+1)
Randy