« Previous | Next » 

Revision d03796c2

IDd03796c2b001e9280fda0afc31bb51e7a74463c0

Added by Giorgos Korfiatis about 9 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