Skip to content

fix(indLin): serialize wIndLin #1189

Description

@mattfidler

Current behavior

_globals.gindLin -- the array behind op->indLin -- is allocated fresh on
every solve setup from mv$indLin[[4]] (src/rxData.cpp:6143-6147), but
src/rxSerialize.cpp writes only the scalar indLinN (:142). The array itself
is never round-tripped.

Harmless while codes 3/4 are unreachable. Once the iteration is restored, a
save/restore cycle would come back with an empty convergence set.

Change

Append an int blob at the end of the existing sequence, following the
sWriteIntBlob pattern already used in that file for cov0, splitBolus,
par_sample and linCmtScale. Field order is fixed and guarded by a format
version and a sizeof(rx_solving_options) check -- do not insert mid-list.

Test

Solve, serialize, deserialize, solve again for an indLin()-forcing model;
assert identical output.

Blocked by #1185.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions