Learn R Programming

fb4package (version 2.0.0)

execute_simulation_with_method: Execute simulation with any method

Description

Unified simulation execution function used by all strategies. Wraps run_fb4_simulation with a common interface for p_value, ration_percent, and ration_grams methods.

Usage

execute_simulation_with_method(
  method_type,
  method_value,
  processed_simulation_data,
  oxycal = 13560,
  extract_metric = "full",
  output_daily = FALSE,
  verbose = FALSE
)

Value

Extracted metric (if extract_metric specified) or full simulation result

Arguments

method_type

Method type ("p_value", "ration_percent", "ration_grams")

method_value

Method-specific value

processed_simulation_data

Complete processed simulation data

oxycal

Oxycalorific coefficient, default 13560

extract_metric

What to extract: "weight", "consumption", "full" (default "full")

output_daily

Whether to include daily output, default FALSE for fitting

verbose

Whether to show progress messages, default FALSE