Sets the nodal prices associated with each offer/bid.
324425
def _nodalPrices(self, haveQ):
        
        # Guarantee that cleared offer prices are >= offered prices.
        gteeOfferPrice = True
        gteeBidPrice = True

        for offer in self.offers:
            if not offer.reactive:
                # Get nodal marginal price from OPF results.
                offer.lmbda = offer.generator.bus.p_lmbda
                offer.totalQuantity = offer.generator.p *offer.generator.online
            else:
                offer.lmbda = offer.generator.bus.q_lmbda
                offer.totalQuantity = \
                    abs(offer.generator.q) * offer.generator.online
        for bid in self.bids:
            bus = bid.vLoad.bus

            if not bid.reactive:
                # Fudge factor to include price of bundled reactive power.
                if bid.vLoad.q_max == 0.0:
                    pf = bid.vLoad.q_min / bid.vLoad.p_min
                elif bid.vLoad.q_min == 0.0:
                    pf = bid.vLoad.q_max / bid.vLoad.p_min
                else:
                    pf = 0.0

                # Use bundled lambdas. For loads Q = pf * P.
                bid.lmbda = bus.p_lmbda + pf * bus.q_lmbda

                bid.totalQuantity = -bid.vLoad.p * bid.vLoad.online
                # Guarantee that cleared bids are <= bids.
                gteeBidPrice = True
            else:
                # Use unbundled lambdas.
                bid.lmbda = bus.q_lmbda

                bid.totalQuantity = abs(bid.vLoad.q) * bid.vLoad.online
                # Allow cleared bids to be above bid price.
                gteeBidPrice = False

        return gteeOfferPrice, gteeBidPrice
1117509
protected function applyValues()
    {
        foreach ($this->elements as $element) {
            $name = $element->getAttribute("name");
            if (isset($this->values[$name])) {
                $element->setAttribute("value", $this->values[$name]);
            } elseif (substr($name, -2) == "[]" && isset($this->values[substr($name, 0, -2)])) {
                $element->setAttribute("value", $this->values[substr($name, 0, -2)]);
            }
        }
    }
1122980
@Override
  public final void setItsId(final BuyerPriceCategoryId pItsId) {
    this.itsId = pItsId;
    if (this.itsId != null) {
      this.priceCategory = this.itsId.getPriceCategory();
      this.buyer = this.itsId.getBuyer();
    } else {
      this.priceCategory = null;
      this.buyer = null;
    }
  }
350550
def _set_intvals(kws, keys):
        """"""
        for key in keys:
            if key in kws:
                kws[key] = int(kws[key])
993381
void setNewNodes() {

        int index = tTable.getIndexCount();

        nPrimaryNode = new NodeAVLMemoryPointer(this);

        NodeAVL n = nPrimaryNode;

        for (int i = 1; i < index; i++) {
            n.nNext = new NodeAVLMemoryPointer(this);
            n       = n.nNext;
        }
    }
13080
def edge_val_set(self, graph, orig, dest, idx, key, branch, turn, tick, value):
        """"""
        if (branch, turn, tick) in self._btts:
            raise TimeError
        self._btts.add((branch, turn, tick))
        graph, orig, dest, key, value = map(self.pack, (graph, orig, dest, key, value))
        self._edgevals2set.append(
            (graph, orig, dest, idx, key, branch, turn, tick, value)
        )
288054
def run(self):
        
        # Compute cleared offer/bid quantities from total dispatched quantity.
        self._clearQuantities()

        # Compute shift values to add to lam to get desired pricing.
#        lao, fro, lab, frb = self._first_rejected_last_accepted()

        # Clear offer/bid prices according to auction type.
        self._clearPrices()
#        self._clear_prices(lao, fro, lab, frb)

        # Clip cleared prices according to guarantees and limits.
        self._clipPrices()

        self._logClearances()

        return self.offers, self.bids
1024685
public void setEnterpriseCost(int index, Number value)
   {
      set(selectField(AssignmentFieldLists.ENTERPRISE_COST, index), value);
   }
1177251
public final void setBuyer(final OnlineBuyer pBuyer) {
    this.buyer = pBuyer;
    if (this.itsId == null) {
      this.itsId = new BuyerPriceCategoryId();
    }
    this.itsId.setBuyer(this.buyer);
  }
691508
def _set(self, value):
    """"""
    if self.__is_parent_node():
      for child in self.__sub_counters.itervalues():
        child._set(value)
    else:
      self.__counter = value
1364174
public void setValues(
                    final Collection<?> values
                    )
    {
        if (values != _values) {
            clear();
            if (values == null  ||  values.size() == 0) {
                return;
            }

            for (Object  value : values) {
                addValue( value );
            }
        }
    }
1045688
void set3(int newPrice, int optCur, int back2, int len2, int back) {
        price = newPrice;
        optPrev = optCur + len2 + 1;
        backPrev = back;
        prev1IsLiteral = true;
        hasPrev2 = true;
        optPrev2 = optCur;
        backPrev2 = back2;
    }
1263102
protected void setValue(int newPosition, T1 valueSum, long valueN,
      boolean currentExisting) {
    if (valueN > 0) {
      if (currentExisting) {
        newBasicValueSumList[newPosition] = operations
            .add11(newBasicValueSumList[newPosition], valueSum);
        newBasicValueNList[newPosition] += valueN;
      } else {
        newBasicValueSumList[newPosition] = valueSum;
        newBasicValueNList[newPosition] = valueN;
      }
    }
  }
386742
def setValuesTyped(self, rows, *values):
        ''
        for r, v in zip(rows, itertools.cycle(self.type(val) for val in values)):
            self.setValueSafe(r, v)
        self.recalc()
        return status('set %d cells to %d values' % (len(rows), len(values)))
212718
def set(self, index, value=None, dir=False, ttl=None, expiration=None):
        """"""
        if bool(dir) is (value is not None):
            raise TypeError('Choose one of value or directory')
        if (ttl is not None) is (expiration is None):
            raise TypeError('Both of ttl and expiration required')
        self.value = value
        if self.dir != dir:
            self.dir = dir
            self.nodes = {} if dir else None
        self.ttl = ttl
        self.expiration = expiration
        self.modified_index = index
357186
def set_items(self, items):
        """"""
        res = []
        max_value = max(sum((rec[1] for rec in items)), 1)
        for key, val in items:
            res.append((key, val, val * 1.0 / max_value))
        self._items = res
893169
protected void set(double values[][])
    {
        super.set(values);
        nRows = nCols = Math.min(nRows, nCols);
    }