refactoring of dict_to_iterator generator (for later usage in case 2 special constraint solver part to solve affecting var problem)