Skip to content

Actuation And Management

GreenFlux separates physical equipment, actuator commands, control logic and operational management. This keeps simulations traceable and avoids hiding decision logic inside equipment models.

Responsibility Boundaries

equipment -> physical device models
actuation -> command language for devices
controls -> local feedback rules
management -> operational policies
problems -> evaluation environment
experiments -> reproducible run package

Equipment

greenflux.equipment describes what exists physically:

  • roof vents and fan ventilation
  • lamps
  • screens
  • heaters and pipes
  • CO2 sources
  • dehumidifiers and fogging
  • irrigation/fertigation devices

Equipment models should expose capacities, efficiencies and physical responses. They should not decide when to operate.

Actuation

greenflux.actuation defines the shared command object used by controls, management policies and problem environments:

from greenflux.actuation import ActuationLimits, GreenhouseActuation

command = GreenhouseActuation(
    roof_opening=0.2,
    screen_closure=0.0,
    heating_power_w_m2=45.0,
    lighting_power_w_m2=80.0,
    co2_injection_mg_m2_s=10.0,
)

safe_command = command.clipped(
    ActuationLimits(
        max_heating_power_w_m2=60.0,
        max_lighting_power_w_m2=100.0,
        max_co2_injection_mg_m2_s=20.0,
    )
)

GreenhouseActuation is intentionally simple. It validates command ranges and can convert weather plus actuator commands into GreenhouseUnitInputs.

Controls

greenflux.controls is for local control rules such as:

  • PID loops
  • temperature window opening rules
  • humidity control rules
  • lighting control blocks

Controls can produce GreenhouseActuation objects, but they should stay small and focused on local feedback.

Management

greenflux.management is for high-level operating policies. Examples:

  • static operation
  • day/night schedules
  • crop-stage schedules
  • energy-saving modes
  • future irrigation, pruning and harvest management events

Current policies:

from greenflux.actuation import GreenhouseActuation
from greenflux.management import DayNightManagementPolicy

policy = DayNightManagementPolicy(
    day_command=GreenhouseActuation(lighting_power_w_m2=80.0),
    night_command=GreenhouseActuation(screen_closure=1.0, heating_power_w_m2=40.0),
)

Policies are usable as problem action schedules:

result = problem.environment(weather=weather).run(
    action_schedule=lambda time_s, state: policy.action(time_s=time_s, state=state)
)

Problems And Experiments

greenflux.problems consumes actuation commands while evaluating a project and case against weather and an objective. It should not own actuator definitions or management strategy.

greenflux.experiments packages that problem run into a reproducible result.

This gives GreenFlux a stable path for future MPC, optimization or reinforcement learning adapters without forcing those frameworks into the core simulator.