atomica.optimization.SpendingPackageAdjustment

class atomica.optimization.SpendingPackageAdjustment(package_name, t, prog_names, initial_spends, min_props=None, max_props=None, min_total_spend=0.0, max_total_spend=inf)[source]

Bases: atomica.optimization.Adjustment

Adjustment to set total spending on several programs

This adjustment can be used when it is important to constrain the sum of spending on multiple programs. For example, a package could be defined for ‘MDR short’ and ‘MDR standard’ standard programs, where the adjustments would be the total spend on MDR, and the fraction spent on MDR short.

Parameters
  • package_name (str) –

  • t

  • prog_names (list) –

  • initial_spends

  • min_props (Optional[list]) – List of minimum proportion to spend on each program, same length as prog_names

  • max_props (Optional[list]) – List of maximum proportion to spend on each program, same length as prog_names

  • min_total_spend (float) – Minimum total spend

  • max_total_spend (float) – Maximum total spend

Attributes

Methods

get_initialization

Return initial values for ASD

update_instructions

adjustables

A list of Adjustables

get_initialization(progset, instructions)

Return initial values for ASD

Parameters
Return type

list

Returns

A list of initial values, one for each adjustable