This problem is synonymous with solving the bin packing problem
n times, where
n is the total number of types. Therefore, I think it would be much easier to break your Items list into sublists, each consisting of one type. Then, use each sublist as input to its own bin packing problem. The solution to each subproblem will be the minimum # of bins for that specific type. The sum of the subproblem solutions will be your final solution (i.e. the minimum bins for all types).
Not sure if you're using Python, but Here's some quick Python to get your Items into sublists:
```
import itertools
items = [{'name': 'item_a', 'weight': 'w1', 'type': 'type1'}, {'name': 'item_b', 'weight': 'w2', 'type': 'type2'}, {'name': 'item_c', 'weight': 'w3', 'type': 'type3'}, {'name': 'item_d', 'weight': 'w4', 'type': 'type1'}, {'name': 'item_e', 'weight': 'w5', 'type': 'type2'}]
sorted_items_by_type = sorted(items, key=lambda x: x['type']) # must be sorted for the itertools.groupby function
sublists = []
for k, g in itertools.groupby(sorted_items_by_type, key=lambda x: x['type']):
group = list(g)
print(f'Type {k}:', group)
sublists.append(group)
# now 'sublists' contains a list for each type
```