code: def run(self):
          
          # Start the clock.
          t0 = time.time()
  
          # Manage reactive power offers/bids.
          haveQ = self._isReactiveMarket()
  
          # Withhold offers/bids outwith optional price limits.
          self._withholdOffbids()
  
          # Convert offers/bids to pwl functions and update limits.
          self._offbidToCase()
  
          # Compute dispatch points and LMPs using OPF.
          success = self._runOPF()
  
          if success:
              # Get nodal marginal prices from OPF.
              gteeOfferPrice, gteeBidPrice = self._nodalPrices(haveQ)
              # Determine quantity and price for each offer/bid.
              self._runAuction(gteeOfferPrice, gteeBidPrice, haveQ)
  
              logger.info("SmartMarket cleared in %.3fs" % (time.time() - t0))
          else:
              for offbid in self.offers + self.bids:
                  offbid.clearedQuantity = 0.0
                  offbid.clearedPrice = 0.0
                  offbid.accepted = False
  
                  offbid.generator.p = 0.0
  
              logger.error("Non-convergent market OPF. Blackout!")
  
          return self.offers, self.bids
docs: Computes cleared offers and bids.