goo.growth

class goo.growth.GrowthController(current_volume, growth_type, growth_rate)[source]

Bases: object

set_pressure(pressure)[source]

Set new pressure.

step_divided(current_volume, dt)[source]

Step through the growth controller after division.

step_growth(current_volume, dt)[source]

Step through the growth controller to calculate normal growth.

Returns new pressure.

goo.growth.GrowthType

alias of Growth

class goo.growth.PIDController(current_volume, growth_type=Growth.LINEAR, growth_rate=1, initial_pressure=0.01, target_volume=30, Kp=0.05, Ki=1e-05, Kd=0.5)[source]

Bases: GrowthController

Class to control growth by a PID controller, in which changes to a cell’s internal pressure governs how much it grows in the next frame.

Variables:
  • growth_type (Growth) – Type of growth exhibited by cells.

  • growth_rate (float) – Rate of growth of cells.

  • initial_pressure (float) – Initial pressure of cells.

  • target_volume (float) – Target volume of cells.

  • Kp (float) – P variable of the PID controller.

  • Ki (float) – I variable of the PID controller.

  • Kd (float) – D variable of the PID controller.

copy()[source]
set_pressure(pressure)[source]

Set new pressure.

step_divided(new_volume)[source]

Step through the growth controller after division.

step_growth(current_volume, dt)[source]

Step through the growth controller to calculate normal growth.

Parameters:
  • current_volume (float) – Current volume of the cell.

  • dt (float) – Time step.

Returns:

The pressure at the next time step.

Return type:

float