Skip to content

Conversation

@EveCharbie
Copy link
Collaborator

@EveCharbie EveCharbie commented Apr 10, 2025

This change is Reviewable

@EveCharbie EveCharbie changed the title [WIP] multinode penalties with OdeSolver.COLLOCATION (inclusion of cx_intermediates) [RTR] multinode penalties with OdeSolver.COLLOCATION (inclusion of cx_intermediates) Apr 22, 2025
@EveCharbie EveCharbie changed the title [RTR] multinode penalties with OdeSolver.COLLOCATION (inclusion of cx_intermediates) multinode penalties with OdeSolver.COLLOCATION (inclusion of cx_intermediates) Apr 25, 2025
@EveCharbie EveCharbie changed the title multinode penalties with OdeSolver.COLLOCATION (inclusion of cx_intermediates) [RTR] multinode penalties with OdeSolver.COLLOCATION (inclusion of cx_intermediates) Apr 25, 2025
Copy link
Member

@pariterre pariterre left a comment

Choose a reason for hiding this comment

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

Reviewed 8 of 8 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @EveCharbie)


bioptim/limits/penalty_helpers.py line 86 at r1 (raw file):

            idx = 0
            for phase, node, sub in zip(phases, nodes, subnodes):
                if (

Can you explain the actual case in a comment?


bioptim/limits/multinode_penalty.py line 286 at r1 (raw file):

                raise RuntimeError("This continuity function is only valid for 2 nodes")

            algebraic_states_end_interval = controllers[0].algebraic_states[key].cx_intermediates_list[-1]

Add a comment here to remind us why it makes sense not to use cx_end (as of cx_start)


bioptim/limits/penalty_option.py line 705 at r1 (raw file):

            if sn_idx.stop == 1:
                pass
            elif sn_idx.stop is None:

Typically None goes up to the actual last while -1 is the one before to last. This mean they could be reversed?

@pariterre pariterre changed the title [RTR] multinode penalties with OdeSolver.COLLOCATION (inclusion of cx_intermediates) multinode penalties with OdeSolver.COLLOCATION (inclusion of cx_intermediates) May 21, 2025
@EveCharbie EveCharbie changed the title multinode penalties with OdeSolver.COLLOCATION (inclusion of cx_intermediates) [RTR] multinode penalties with OdeSolver.COLLOCATION (inclusion of cx_intermediates) May 22, 2025
@EveCharbie
Copy link
Collaborator Author

@pariterre could you rereview this offline ? (I only changed the slicing with -1 and None to try to make it more intuitive)

Copy link
Member

@pariterre pariterre left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 7 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @EveCharbie)

@pariterre pariterre merged commit 005cfdd into pyomeca:master May 28, 2025
19 of 22 checks passed
@EveCharbie EveCharbie deleted the multinode_COLLOCATION branch May 29, 2025 05:31
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