Skip to content

fix: project starting_point into reduced space - #16

Open
stPhena wants to merge 1 commit into
pregnault:mainfrom
stPhena:fix/starting-point-dimensions
Open

stPhena wants to merge 1 commit into
pregnault:mainfrom
stPhena:fix/starting-point-dimensions

Conversation

@stPhena

@stPhena stPhena commented Aug 3, 2026

Copy link
Copy Markdown

Fixes the "Starting Point has to lie in the same dimension as the polytope P" error raised by rlim() whenever a starting_point is supplied together with a LIM containing equality constraints (lim$A/lim$B).
rlim() reduces the polytope via lim.redpol() before calling sample_points(), but was forwarding starting_point unchanged, in the original (unknowns) space, instead of projecting it into the reduced space via x0/Z. This patch adds that projection using MASS::ginv().

@pregnault
pregnault requested review from GrenteTheo, brehel1 and morgancolet and removed request for morgancolet October 1, 2026 12:59
@pregnault

pregnault commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Dear @stPhena,
thank you very much for having pointed out this issue and for your patch proposal, which is perfectly relevant. We shall include it to the main branch of the repo after adding tests for CI/CD workflows.

@brehel1, can you please add some unit tests for covering this case (starting_point is provided by the user in rlim() and projected in the reduced space prior to sampling)?

This branch has not been deployed

No deployments
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