Skip to content

Minor fgen fixes #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 7, 2025
Merged

Minor fgen fixes #11

merged 3 commits into from
Jul 7, 2025

Conversation

RXGottlieb
Copy link
Member

  • Add var_names(::GradTransform, [...]) and all_names for generating symbolic subgradient variables
  • Fix inversion operation in division when lower and upper bounds are the same
  • Add more support for higher variable indices
  • Add error for binarize! to assist in debugging
  • Add split_div::Bool argument to factor, which determines whether terms like x/y will remain as-is or get factored into x * (1/y)
  • Improve variable sorting so that, e.g., x10 will not come before x2
  • Add extract, which can pull a subexpression out of a primal trace and substitute out auxiliary variables
  • Fix fgen bug that would use an incorrect subgradient variable

- Add `var_names(::GradTransform, [...])` and `all_names` for generating symbolic subgradient variables
- Fix inversion operation in division when lower and upper bounds are the same
- Add more support for higher variable indices
- Add error for `binarize!` to assist in debugging
- Add `split_div::Bool` argument to `factor`, which determines whether terms like `x/y` will remain as-is or get factored into `x * (1/y)`
- Improve variable sorting so that, e.g., `x10` will not come before `x2`
- Add `extract`, which can pull a subexpression out of a primal trace and substitute out auxiliary variables
- Fix `fgen` bug that would use an incorrect subgradient variable
- Tests for division operations removed for `fgen`. Rules were written to match McCormick.jl, which was modified after this issue: PSORLab/McCormick.jl#69. This change only affects division by a negative McCormick object when the convex and concave relaxation values are not the same, but since `fgen` will be deprecated in v0.5, this issue in `fgen` is not planned to be fixed.
@RXGottlieb RXGottlieb merged commit fe56817 into PSORLab:master Jul 7, 2025
4 of 6 checks 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.

1 participant