« Previous | Next » 

Revision c8f4eef6

IDc8f4eef64a3a721d51358d4f23e251486c615539

Added by Giorgos Korfiatis about 11 years ago

Redesign quota holding

A Holding now tracks the current usage (amount imported)
and the amount available to export (stock).

Counters come in pairs (imported_min, imported_max and
stock_min, stock_max respectively) to allow for a two-step
commission.

For example, issuing a commission to import some quantity
increases imported_max. When accepting the commission,
imported_min increases by the same quantity; at the same time
the stock counters increase, too, since the quantity imported
becomes available for re-export.

This commissioning logic is factored out for clarity in file commission.py.

Remove also quantity (initial supply) from Policy.
This can be simulated by setting the holding counters to the desired value.
Since capacity now represents the total capacity, care must be taken
that it be no less than the initial supply set as suggested.

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences