Module: Legion::Extensions::Agentic::Homeostasis::Tide::Helpers::Constants

Defined in:
lib/legion/extensions/agentic/homeostasis/tide/helpers/constants.rb

Constant Summary collapse

TIDE_PHASES =
%i[rising high_tide falling low_tide].freeze
OSCILLATOR_TYPES =
%i[primary secondary lunar].freeze
MAX_POOLS =
50
POOL_EVAPORATION_RATE =
0.01
TIDE_LABELS =

Range-based tide label lookup — ranges are ordered from highest to lowest

[
  { range: (0.85..1.0),   label: 'peak' },
  { range: (0.65..0.85),  label: 'high' },
  { range: (0.45..0.65),  label: 'moderate' },
  { range: (0.25..0.45),  label: 'low' },
  { range: (0.0..0.25),   label: 'ebb' }
].freeze
SPRING_TIDE_PHASE_TOLERANCE =

Spring tide threshold: two oscillators are considered in phase when their values differ by less than this proportion of their combined amplitude

0.15
HARVEST_RISING_THRESHOLD =

Minimum tide level above which harvest is permitted

0.3
FORECAST_RESOLUTION =

Forecast resolution: seconds between each forecast sample

300