Hi,
I am trying to make all the combinations of the list below, given a certain criteria
List (Input)[TABLE="width: 427"]
<tbody>[TR]
[/TR]
[TR]
[TD][TABLE="width: 489"]
<tbody>[TR]
[TD][/TD]
[TD]Failure of 1 production line[/TD]
[TD]Failure of 2 production line[/TD]
[TD]Failure of 3 production line[/TD]
[/TR]
[TR]
[TD]Factory 1[/TD]
[TD]A1[/TD]
[TD]B1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Factory 2[/TD]
[TD]A2[/TD]
[TD]B2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Factory 3[/TD]
[TD]A3[/TD]
[TD]B3[/TD]
[TD]C3[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[/TR]
[TR]
[TD]The ouputs should be all the potential combinations from 1 production to all the 9 failing. The trick here is that I can't have combinations of any of the items in the B column (and following), if the item in the same row from the previous column is not envolved. For example, I want to exclude combinations that include B1 and do not include A1 (A2+B1 for example).
The output should look like this:
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Output
[TABLE="width: 427"]
<tbody>[TR]
[TD]Combinations of 1
[/TD]
[TD]Combinations of 2[/TD]
[TD]Combinations of 3[/TD]
[TD]Combinations of ...[/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]A1+B1[/TD]
[TD]A1+B1+A2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A2[/TD]
[TD]A1+A2[/TD]
[TD]A1+A2+A3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A3[/TD]
[TD]A1+A3[/TD]
[TD]A1+A2+B2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]A2+B2[/TD]
[TD]...[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]A3+B3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
And give the condition above, these would not be valid outputs:
[TABLE="width: 363"]
<tbody>[TR]
[TD]Combinations of 1
[/TD]
[TD]Combinations of 2[/TD]
[TD]Combinations of 3[/TD]
[/TR]
[TR]
[TD]B1[/TD]
[TD]A1+B2[/TD]
[TD]B1+B2+B3[/TD]
[/TR]
[TR]
[TD]B2[/TD]
[TD]A1+C3[/TD]
[TD]A1+B2+A3[/TD]
[/TR]
[TR]
[TD]B3[/TD]
[TD]...[/TD]
[TD]...[/TD]
[/TR]
[TR]
[TD]C3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Many thanks in advance! Please let me know if this is not clear!
Best,
anao_
I am trying to make all the combinations of the list below, given a certain criteria
List (Input)[TABLE="width: 427"]
<tbody>[TR]
[/TR]
[TR]
[TD][TABLE="width: 489"]
<tbody>[TR]
[TD][/TD]
[TD]Failure of 1 production line[/TD]
[TD]Failure of 2 production line[/TD]
[TD]Failure of 3 production line[/TD]
[/TR]
[TR]
[TD]Factory 1[/TD]
[TD]A1[/TD]
[TD]B1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Factory 2[/TD]
[TD]A2[/TD]
[TD]B2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Factory 3[/TD]
[TD]A3[/TD]
[TD]B3[/TD]
[TD]C3[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[/TR]
[TR]
[TD]The ouputs should be all the potential combinations from 1 production to all the 9 failing. The trick here is that I can't have combinations of any of the items in the B column (and following), if the item in the same row from the previous column is not envolved. For example, I want to exclude combinations that include B1 and do not include A1 (A2+B1 for example).
The output should look like this:
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Output
[TABLE="width: 427"]
<tbody>[TR]
[TD]Combinations of 1
[/TD]
[TD]Combinations of 2[/TD]
[TD]Combinations of 3[/TD]
[TD]Combinations of ...[/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]A1+B1[/TD]
[TD]A1+B1+A2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A2[/TD]
[TD]A1+A2[/TD]
[TD]A1+A2+A3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A3[/TD]
[TD]A1+A3[/TD]
[TD]A1+A2+B2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]A2+B2[/TD]
[TD]...[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]A3+B3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
And give the condition above, these would not be valid outputs:
[TABLE="width: 363"]
<tbody>[TR]
[TD]Combinations of 1
[/TD]
[TD]Combinations of 2[/TD]
[TD]Combinations of 3[/TD]
[/TR]
[TR]
[TD]B1[/TD]
[TD]A1+B2[/TD]
[TD]B1+B2+B3[/TD]
[/TR]
[TR]
[TD]B2[/TD]
[TD]A1+C3[/TD]
[TD]A1+B2+A3[/TD]
[/TR]
[TR]
[TD]B3[/TD]
[TD]...[/TD]
[TD]...[/TD]
[/TR]
[TR]
[TD]C3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Many thanks in advance! Please let me know if this is not clear!
Best,
anao_