private static void CalculateCombinationSet(BackpackTask backpackTask, CombinationSet set,
                                                    TaskProgress service, CancellationToken token)
        {
            if (token.IsCancellationRequested)
            {
                return;
            }
            //  iterate over all item combinations
            //  calculate total weight and price of current item set
            var totalWeight = 0;
            var totalPrice  = 0;

            foreach (var itemCombination in set.ItemCombinations)
            {
                totalWeight += itemCombination.Item.Weight;
                totalPrice  += itemCombination.Item.Price;
            }

            //  check if we ok with totalWeight and current price of item set is greater that current best item set price
            if (totalWeight <= backpackTask.WeightLimit &&
                totalPrice > backpackTask.BestItemSetPrice)
            {
                //  update current solution
                backpackTask.BestItemSetPrice  = totalPrice;
                backpackTask.BestItemSetWeight = totalWeight;
                List <Item> items = new List <Item>();
                foreach (var itemCombo in set.ItemCombinations)
                {
                    items.Add(itemCombo.Item);
                }
                backpackTask.BestItemSet = new List <BestItemSet>();
                foreach (var item in items)
                {
                    backpackTask.BestItemSet.Add(new BestItemSet()
                    {
                        Item = item
                    });
                }
            }

            service.UpdateProgress();
        }