code: def unbounded(self):
          
          self._check_valid()
  
          cp = self._problem._cp
          status = cp.solution.get_status()
          presolve = cp.parameters.preprocessing.presolve.get()
          if (status == cp.solution.status.infeasible_or_unbounded and
                  presolve):
              # Disable presolve to obtain a definitive answer
              logger.info('Disabling presolver and solving again to determine'
                          ' whether objective is unbounded.')
              cp.parameters.preprocessing.presolve.set(False)
              try:
                  self._problem._solve()
              finally:
                  cp.parameters.preprocessing.presolve.set(True)
  
              status = cp.solution.get_status()
  
          return status == cp.solution.status.unbounded
docs: Whether solution is unbounded