Fix CLDDP test regularization initial value#154
Conversation
Summary of ChangesHello @astomodynamics, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a specific test failure within the CLDDP solver by adjusting a configuration parameter. The change involves modifying the initial regularization value to a more appropriate setting, ensuring the test suite passes reliably and maintains the integrity of the solver's validation process. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses a test failure in the CLDDPTest::SolveCar test by adjusting the initial regularization value from 1e-7 to 1e-6. This is a sensible change that aligns the parameter with the solver's default and likely enhances numerical stability. My review includes one suggestion related to improving code maintainability by removing redundant option initializations in the test setup.
| options.verbose = true; | ||
| options.debug = false; | ||
| options.regularization.initial_value = 1e-7; | ||
| options.regularization.initial_value = 1e-6; |
There was a problem hiding this comment.
This line sets the regularization initial value to 1e-6, which is its default value. I noticed that several other options in this test are also explicitly set to their default values (e.g., acceptable_tolerance, verbose, debug). To improve code clarity and reduce redundancy, consider removing the explicit assignments for all options that use their default values. This would make the test setup cleaner by only highlighting the non-default parameters.
Summary
Changes
tests/cddp_core/test_clddp_solver.cppto use more appropriate regularization valueTest plan