Skip to content

Raneff parameterization#111

Open
mduncans wants to merge 14 commits intononmem-parser2from
raneff-parameterization
Open

Raneff parameterization#111
mduncans wants to merge 14 commits intononmem-parser2from
raneff-parameterization

Conversation

@mduncans
Copy link
Copy Markdown
Collaborator

@mduncans mduncans commented Apr 8, 2026

Updates the parameterization and handling of Omega and Sigma blocks. Tests have been run in nonmem to verify valid/invalid control streams. The results are saved to nonmem-parser/docs/nm-test-results.md

OMEGA/SIGMA blocks now carry either Cholesky parameterization or Diagonal + Off-diagonal parameterization, to allow for blocks like: (case15_block_sd_corr)

$OMEGA BLOCK(3) SD CORR
0.1
0.01 0.2
0.01 0.01 0.3

Flags like FIX, SD, CORR, etc apply to the entire block not the individual parameters. OmegaSigmaParam themselves no longer carry the fixed flag (case19_block_fix_inline). Because of this get_omega_parameters now also gives block_fixed

BLOCK(N) SAME must follow a BLOCK(N) or BLOCK(N) SAME block (case29_same_intervening)

NAMES is only applicable on BLOCK (reject08_names_diagonal)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unreferenced snapshot

@mduncans mduncans requested a review from Keats April 8, 2026 17:19
Comment thread components/nonmem-parser/src/model/parameters.rs Outdated
Comment thread components/nonmem-parser/src/model/parameters.rs Outdated
expression: "rendered.join(\"\\n\")"
input_file: components/nonmem-parser/test_data/errors/omega_same_no_preceding_block.mod
---
error: SAME must immediately follow a BLOCK(2)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that specific test is confusing since it literally follows a BLOCK(2). Can we point the block before as a note?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh yeah this is confusing, I'll update the control stream to be more meaningful. What this is supposed to show is that a block same has to come after a block or block same.

$OMEGA BLOCK(2) SD CORR
0.2
0.3 0.15
$OMEGA 0.04
$OMEGA BLOCK(2) SAME

Is invalid: case29_same_intervening

.collect()
}

fn uniform_diagonal_parametrization(&self, node: &CstNode) -> Option<Parametrization> {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add an example? I don't really get the body of the function

Comment thread components/nonmem-parser/src/lower.rs
Comment thread components/nonmem-parser/src/parser.rs Outdated
Comment thread components/nonmem-parser/src/parser.rs Outdated
Comment thread components/nonmem-parser/src/parser.rs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants