Skip to content

replace inf bounds before setting param.maxUB to avoid unbounded solution#2643

Merged
rmtfleming merged 3 commits into
opencobra:developfrom
PkiwiBird:feature/gecko-relaxFBA
May 6, 2026
Merged

replace inf bounds before setting param.maxUB to avoid unbounded solution#2643
rmtfleming merged 3 commits into
opencobra:developfrom
PkiwiBird:feature/gecko-relaxFBA

Conversation

@PkiwiBird
Copy link
Copy Markdown
Contributor

replace inf bounds before setting param.maxUB to avoid unbounded solution

I hereby confirm that I have:

  • [ x] Tested my code on my own machine
  • [ x] Followed the guidelines in the Contributing Guide
  • [x ] Selected develop as a target branch (top left drop-down menu)

(Note: You may replace [ ] with [X] to check the box)

@github-actions
Copy link
Copy Markdown
Contributor

Summary:

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️
253 218 0 35

Failed Tests:

No failed tests ✨

Github Test Reporter by CTRF 💚

@rmtfleming
Copy link
Copy Markdown
Member

infeasibility \ne unbounded

@PkiwiBird
Copy link
Copy Markdown
Contributor Author

This PR is correcting a mistake I made in the previous PR that was already merged. I originally wrote:

if ~isfield(param,'maxUB')
   param.maxUB = max(max(model.ub),-min(model.lb));
   param.minLB = min(-max(model.ub),min(model.lb));
end

before:

infLB = (model.lb == -inf);
infUB = (model.ub ==  inf);

%add a large finite lower bound here
model.lb(infLB) = -1/feasTol;
%add a large finite upper bound here
model.ub(infUB) = 1/feasTol;

Since the lifted gecko model had some inf in ub, param.maxUB became Inf then propagated into relaxFBA_cappedL1 as the cap for the relaxation slacks (p, q, r), so the slacks become unbounded. that's why now I changed the order and put the 2nd block first.

The PR also now corrects another issue: models without D were failing at rmfield(model, {'ctrs','dsense','d','C','D'}). Now C/D are only removed when they exist

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Summary:

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️
257 222 0 35

Failed Tests:

No failed tests ✨

Github Test Reporter by CTRF 💚

@rmtfleming rmtfleming merged commit 4e16271 into opencobra:develop May 6, 2026
1 check passed
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