Skip to content
  • Giorgos Korfiatis's avatar
    Redesign quota holding · 92bc7295
    Giorgos Korfiatis authored
    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.
    92bc7295