Skip to contents

opal 0.1.5

  • 2026/12/03 (#174): The timing-ab benchmark gates Opakapaka fit counts on eight paired starts per revision (median of the per-start HEAD/BASE ratios), plus where the fits end and whether they converge, instead of on one fit, whose counts change by more than 10% with rounding-level changes such as #172. The fit’s allocation is reported, not gated. Benchmark harness only; the package is unchanged.

  • 2026/12/03 (#169): .github/scripts/setup-r-env.R now runs all phases on Windows when called without arguments; it previously exited with status 5 after “Bootstrap locked renv”.

  • 2026/12/02 (#172): Length and weight composition likelihoods now tape the catch-at-age × PLA products as atomic RTMB matrix operations, reducing tape size and speeding up derivatives without changing the model. This requires RTMB 2.0 or later.

  • 2026/12/01 (#170): The development and CI environment (renv.lock) now uses R 4.6.2, with every package updated: RTMB 2.0, TMB 1.9.25, RTMBdist 1.2.1, Matrix 1.7-6 and renv 1.3.1; SparseNUTS stays at its current main (2f3f162). xfun (0.57) and DBI (1.3.0) keep their previous versions until the package mirror used by CI serves the current releases. R 4.6.2 fixes nlminb(), and Matrix 1.7-6 removes the need for the Matrix 1.7-1 workaround that R 4.6 required in the environment setup (now removed).

  • Fits made under R < 4.6.2 can take a different optimizer path and, for multimodal models, reach a different end point. Refitted from scratch under R 4.6.2, the Opakapaka quickstart, its golden reference and the assessment example reproduce their objectives (within 2e-9); the IO yellowfin AGE fit reaches a different optimum (B0 12% higher) and AGE-SF a worse one, so io_yft_age_sf_fit.rds keeps its stored optimum and the bridge table its values. The pull request lists every stored file with its old and new objective. Benchmark baselines and trajectories were recalibrated on hosted runners.

  • Object checksums are now portable between R versions. opal_read() and the stored-result checks hash a canonical copy of the object: R 4.5 and earlier serialize an internal flag that R 4.6 drops, so R 4.6 rejected some objects saved under R 4.5 (“Invalid or modified Opal file payload”). Checksums written by earlier opal versions are still accepted where R can recompute them. An object saved under R 4.5 or earlier that carries the flag (for example, one holding a data frame from package data) cannot be verified under R 4.6 and later; read it and save it again with opal_save() under the R version that wrote it. Reading, saving, and updating migrate the object’s identity, the references to it, and the stored payload checksums to portable hashes after verifying them.

  • The package itself still supports R (>= 3.5); CI now also checks R 4.5 (oldrel).

opal 0.1.4

  • 2026/11/30 (#166): Remove the compResidual dependency from Suggests and renv.lock. The BET development vignette now computes composition residuals with opal_osa(). Development setup no longer grafts OSA headers into TMB or installs packages outside renv. Package code and numerical results are unchanged.

opal 0.1.3

  • 2026/11/03 (#163): Add opt-in performance measurements and separate memory, PR timing A/B, and scheduled instruction-count regression checks. Model numerics are unchanged. Benchmark baselines are regenerated explicitly, never by tests.

  • 2026/11/02 (#155): Reported multinomial lp_lf / lp_wf and their weighted components now use fractional counts unrounded, matching the fitted objective. Objectives, gradients and estimates are unchanged when composition probabilities are AD-valued, including the bundled fits. If probabilities are entirely fixed during taping, the previously rounded objective constant is now unrounded too; this does not change gradients or estimates. Fixed-effect multinomial OSA residuals still round counts for discrete binomial calculations, with one notice per diagnostic call; RTMB’s latent OSA and simulation methods are retained. The scientific model contract is now opal_model_contract_v6 because reported quantities changed. Fits saved under v5 must be refitted or rebuilt before reading with the new contract; their estimates will not change.

opal 0.1.2

  • 2026/10/29: SD of length-at-age can be linear in mean length (SS3 CV_Growth_Pattern = 2). get_sd_at_age() gains sd_model: "cv" (default) is the existing CV-linear form, which is SS3 pattern 0 (the documentation previously called it pattern 2), and "sd" makes SD linear in mean length between log_SD1 and log_SD2, the log SDs at the reference lengths. Optional A1 and A2 hold the SD at its end values below A1 and from A2 on, as SS3 does (SS_ALK.tpl). opal_model() reads the optional data$growth_sd_model; under "sd" it holds the end values, and "cv" objectives are unchanged. get_parameters() adds log_SD1 and log_SD2 (initialized at the SDs implied by the CVs), get_map() fixes them, and get_priors() covers them. For the EPO bigeye SS3 model (GrowthModel 8, pattern 2), "sd" reproduces SS3’s SD_Beg within 0.3%; the CV form was off by up to 72%.
  • 2026/10/28 (9f1260c): The pkgdown site renders math with MathJax (template: math-rendering: mathjax), so \deqn{} and \eqn{} equations in the reference pages display as equations instead of raw LaTeX. get_growth() gains examples that set up each growth configuration (VB, SS3 GrowthModel 3, Richards and growth cessation) from the IO yellowfin inputs.
  • 2026/10/28 (PR #158): Alternative growth curves. get_growth() gains a growth_model argument: "vonB" (default) is the existing Schnute VB curve, "richards" is the Richards curve (L1, L2, log_k, b) and "cessation" is the growth cessation model (L0, log_rmax, log_k_gc, t50, age_offset). SS3 GrowthModel 3 (age-specific K) remains "vonB" with log_k_mult. The Richards parameterization and usage guidance follow the Stock Synthesis user manual (section 8.5.2.2.2); the growth cessation model is Eq. 2 of Maunder et al. (2018, Mar Biol 165:76). opal_model() reads data$growth_model and data$growth_age_offset, both optional, so existing objectives are unchanged. get_parameters() adds richards_b (fixed by get_map()) or log_L0, log_rmax, log_k_gc and t50_gc (estimated) for the selected curve, and get_priors() and get_bounds() cover the new parameters. Under growth cessation, log_CV1 and log_CV2 are the CVs at the predicted lengths at A1 and A2.

opal 0.1.1

  • 2026/10/27 (PR #152): The three Indian Ocean yellowfin articles are now one, “Indian Ocean yellowfin tuna: Cross model comparison with simulated truth and Stock Synthesis estimation model” (io-yft-ss3-comparison). It compares the operating model’s truth, the IATTC team’s SS3 model and opal fit AGE-SF: SS3’s age-based selectivity curves and mirrors, plus SS3’s generalised size compositions for the index on their own bins with SS3’s lambda of 0.51 (row-specific composition bin schemes and lf lambdas). AGE-SF is built inline from the bundled data. The earlier fits appear in one bridge table under consistent names: SS3-SEL, LEN (formerly C2), AGE (formerly A-SS3), AGE-SF and AGE-SF-NP (AGE-SF with SS3’s lambda of 0 on parameter priors). io_yft_reference$ss3 gains sizefreq and lambdas. inst/extdata/ now holds only io_yft_age_sf_fit.rds, the bridge summaries and the article cache; the stored fits C2, A, A-SS3, S1, S2 and the start-sensitivity runs were removed. data-raw/generate-io-yft-fits.R refits every model in the bridge table. The likelihood-lambdas how-to moved to the “Assessment tools” article.
  • 2026/10/26 (#150, PR #151): SS3-style likelihood lambdas. The optional data$lambdas list weights CPUE by index, length and weight compositions by fleet, and the recruitment, initial recruitment, prior and penalty terms; 0 switches a term off, and omitted values default to 1, so existing objectives are unchanged. Reports keep the raw lp_* terms and add weighted lp_*_w terms and lambdas. A prior can carry its own lambda, per block or per element (see opal_set_prior_lambda()), and lambdas$prior_mapped_only drops priors on elements fixed by the map when the model is built from an opal_obj. opal_update() gains a lambdas argument. opal_osa(), opal_mcmc() and fit checks warn about tempered objectives and about parameters a zero lambda leaves without data. With CPUE switched on, non-integer or non-positive CPUE indices are now an error; previously those rows were silently left out of the likelihood.
  • 2026/10/26 (#147, PR #149): Length and weight composition observations can use row-specific, uneven bin schemes, supplied in long format or as a list of wide tables. Only model predictions are rebinned. Tail accumulation remains the default; truncation is optional. Misaligned length edges require an explicit override because proportional-overlap rebinning assumes uniform density within model bins. Composition residuals retain input ordering, and plots now show bin extents in length or weight units with an optional density scale. Existing grids, tail aggregation, objectives, and fitted-model reports remain compatible; this feature does not change the scientific model version.
  • 2026/10/26 (PR #148): Add optional age-based selectivity. The new data element sel_basis_f (1 = length, 2 = age, one per fishery) evaluates the logistic, double-normal or double Richards curve directly on age, using the same par_sel parameters and map, so age-based selectivity can be estimated and mirrored. get_selectivity() gains an age_a argument. convert_ss3_selex_to_rtmb() and convert_rtmb_selex_to_ss3() gain basis and sel_ages arguments to convert SS3 age_selex patterns 12 and 20. Without sel_basis_f, every fishery stays length-based and existing models give identical results. sel_fa_external still takes precedence.
  • 2026/10/16 (89d97c0, PR #148): New Indian Ocean yellowfin case study (simulated data, converted from the IATTC team’s Stock Synthesis model): bundled data io_yft_data, io_yft_parameters, io_yft_map and io_yft_reference, stored fits in inst/extdata/, and two articles: “Comparing opal with Stock Synthesis” and “Length- or age-based selectivity”, which fits the example with age-based selectivity started from SS3’s age_selex parameters. Both articles read outputs precomputed by data-raw/generate-io-yft-vignette-cache.R, so they render in seconds.
  • 2026/10/15 (PR #143): Fix fit validation for random-effect models by calculating the marginal Hessian with optimHess() instead of calling RTMB’s unsupported exact Hessian. Converged, biologically valid random-effect fits can now pass validation and proceed to grid sampling. Diagnostic version v3 invalidates old checks and grid checkpoints; rerun opal_check() on existing v5 objects. This diagnostic fix does not change model objectives or fitted estimates.
  • 2026/10/15 (d65126f, PR #143): Quantify the existing seasonal CPUE correction in reproducible paired simulations: maximum prediction changes at fixed parameters are 8.24% and 12.28%, and refitted B0 changes are +4.99% and +11.71%, for the specified two- and four-season examples. These are illustrative, not real-stock impact estimates or general correction factors. Full-coverage examples fail under the legacy indexing but evaluate under v5. The single-season control is unchanged, and all bundled stock inputs use one season. See the seasonal CPUE impact article for observation coverage, diagnostics, and instructions for rebuilding and refitting saved contract-v4-or-earlier assessments.
  • 2026/10/13 (e1fbdbd, PR #141): Add optional SS3 GrowthModel 3 cumulative age-specific K multipliers and plus-group length adjustment, credited to Stock Synthesis (Methot and Wetzel 2013). Existing model configurations retain their exact growth calculation and numerical contract.

opal 0.1.0

This release makes the staged opal_obj workflow the primary way to run an assessment, from configuration and fitting through MCMC, diagnostics, projections and saved results. It also adds posterior and fit-checking tools. Scientific contract v5 changes CPUE predictions when n_season > 1, so saved models from earlier contracts must be rebuilt.

  • 2026/09/29 (0ea5022): Add biological fit and posterior checks with versioned validation records, posterior report summaries, OSA residuals and dataset-level SDNR plots, composition and prior–posterior plots, objective profiles, resumable model grids, balanced posterior selection, and deterministic equilibrium MSY summaries. Include a simulated posterior and an assessment-tools tutorial. OSA covers lognormal indices and multinomial, Dirichlet, and Dirichlet–multinomial length and weight compositions, including latent-state integration. Dirichlet–multinomial OSA uses sequential beta-binomial densities; ordinary fitting and simulation retain the existing density implementation. Fix seasonal CPUE indexing, boundary diagnostics, invalid prior handling, and figure units. Scientific contract v5 changes CPUE predictions when n_season > 1; the single-season Opakapaka reference is numerically unchanged. Earlier saved model contracts require rebuilding under the new contract. Projection behaviour, selectivity time blocks, and close-kin components are outside this change.

  • 2026/09/29 (fba96ea): Make assessment objects the primary documentation workflow, add a runnable projection vignette, organise the function reference, and publish a separately labelled development pkgdown site with internal-link checks. Model numerics and function interfaces are unchanged.

  • 2026/09/29 (3475a2e): Expand tests for projection uncertainty, recruitment forecasts, selectivity, parameter diagnostics, and bundled data access. Tighten optimiser stopping tolerances in the Quickstart and projection examples while retaining the existing fit-check thresholds. Package model calculations are unchanged.

  • 2026/09/29 (17ae7a6): Introduce the staged opal_obj workflow: configuration, two-pass fitting, MCMC, diagnostics, direct plots, projections with source identities, and portable opal_save()/opal_read() persistence. Preserve legacy fit construction and migrate saved fits with objective verification. Configuration changes invalidate dependent results; metadata updates and same-target refits preserve compatible samples. Model numerics and scientific contract v4 are unchanged.

opal 0.0.4

  • 2026/09/22 (2ae7722): Use portable integrity in the bundled-fit examples so they run across R versions while retaining strict model compatibility and objective checks. Build the package website on pull requests to dev as well as main. Model numerics are unchanged.
  • 2026/09/22 (06f0d7c): Constrain and penalise initial seasonal survival before seasonal compounding when fisheries overlap, and protect equilibrium recruitment from becoming negative under excessive initial fishing. The initialisation penalty is included in the model objective and reported as lp_init_penalty. Safely positive equilibria are unchanged. Previously saved fits use the earlier scientific model contract; the current contract is v4.
  • 2026/09/16 (c5dcdf1): Dirichlet-multinomial composition preparation now preserves half-up rounded effective sample sizes with largest-remainder integer counts. Existing saved fits use the previous scientific model contract.
  • 2026/09/16 (bac7a99): Fished equilibrium initialization now uses the same seasonal harvest-fraction survival convention as the population dynamics, eliminating drift for partial selectivity.