oscar_colony.optimise.breeding_timeline.calculate_breeding_timeline#

oscar_colony.optimise.breeding_timeline.calculate_breeding_timeline(target_age_days, target_date=None, timings=BreedingTimings(gestation_days=20))[source]#

Calculate when to pair the parents so their offspring are target_age_days old on the target_date.

If target_date isn’t given, pairing starts asap.

Parameters:
  • target_age_days (int) – Days old the animals need to be.

  • target_date (date | None) – Date the animals are needed by. If None - asap.

  • timings (BreedingTimings) – Breeding timings to use.

Returns:

The date to pair the parents, and the date the animals reach target_age_days.

Return type:

tuple[date, date]

Raises:

ValueError – If there isn’t enough time between today and target_date, or target_age_days or gestation_days is negative.