oscar_colony.optimise.surplus_summary.GenotypeSurplus#

class oscar_colony.optimise.surplus_summary.GenotypeSurplus(total_n=0, total_n_surplus=0, percent_surplus=0, sex_surplus=None)[source]#

Summary of surplus for a single genotype.

sex_surplus is None where a SexSplit of (n_males, n_females) wasn’t requested for this genotype.

__init__(total_n=0, total_n_surplus=0, percent_surplus=0, sex_surplus=None)#

Methods

__init__([total_n, total_n_surplus, ...])

set_surplus(required_n)

Set the surplus / percent surplus, by comparing the required number to the total.

Attributes

percent_surplus

sex_surplus

total_n

total_n_surplus

set_surplus(required_n)[source]#

Set the surplus / percent surplus, by comparing the required number to the total.

Return type:

None