fixed bags and optimization