Skip to main content

update_selection_state

Function update_selection_state 

Source
fn update_selection_state(
    best_asset: &AssetRef,
    opt_assets: &mut Vec<AssetRef>,
    remaining_agent_addition_limits: &mut HashMap<ProcessID, Capacity>,
    remaining_agent_total_limits: &mut HashMap<ProcessID, Capacity>,
    available_retention_tranches: &mut HashMap<AssetRef, u32>,
)
Expand description

Update the remaining investment options and selection state.

If the asset is a candidate, its one-tranche capacity is subtracted from remaining_agent_addition_limits (if applicable) to ensure that process addition limits are not exceeded. If the asset is commissioned, one tranche is subtracted from available_retention_tranches to ensure that retention does not invent new capacity.

ยงArguments

  • best_asset - The asset that has been selected as the best option in this round
  • opt_assets - The list of remaining asset options to be considered in future rounds
  • remaining_agent_addition_limits - The remaining agent addition limits for processes
  • remaining_agent_total_limit - The remaining capacity for processes
  • available_retention_tranches - The commissioned tranches available for retention