def _decode_value_index(self, idx):
    'Returns dict from variable id to variable value.'
    ans = dict()
    for var_id in self.var_idx:
        size = self.model.get_variable(var_id).domain.size()
        ans[var_id] = (idx % size)
        idx //= size
    return ans
Returns dict from variable id to variable value.
def _decode_value_index(self, idx):
    
    ans = dict()
    for var_id in self.var_idx:
        size = self.model.get_variable(var_id).domain.size()
        ans[var_id] = (idx % size)
        idx //= size
    return ans