I have a specific problem to which i need an algorithm:

Supose there are n bags each one with a different volume, and m things to put inside the bags each one with a different volume.

You only have two options for each thing in M
-to put the entire thing inside a bag
-to break the thing apart in an arbitrary number of pieces, the put the pieces each one in a bag.

However, breaking apart is too costly and should be avoided.

also, extra rules
1)not always there is space in the bags for all the things. the latter ones should be forgotten after filling all the bags
2)not always there is enough things to fill the entire bag
3)you cannot break a thing and forget a piece of it. once you break it, all pieces must be fitted into bags
4)prefer to solve the first things in the row.

Example:
bag 1 vol. 300
bag 2 vol. 100
bag 3 vol. 15

things
#1 vol. 5
#2 vol. 250
#3 vol. 10
#4 vol. 200

most correct way of the example
#1 and #3 go to bag3
then you break apart either #2 , filling the bag 2, and the rest on bag 1.
now you stop, because if you break the #4 you will leave some of it way, and you can't by rule #3