Skip to content
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

Terminology PR #465

Merged
merged 14 commits into from
May 19, 2022
Merged

Conversation

Ipuch
Copy link
Collaborator

@Ipuch Ipuch commented May 9, 2022

Enhanced terminology for algebraic constraints.


This change is Reviewable

@codecov
Copy link

codecov bot commented May 9, 2022

Codecov Report

Merging #465 (186112d) into CrazyDynamics (7178305) will decrease coverage by 0.03%.
The diff coverage is 71.73%.

❗ Current head 186112d differs from pull request most recent head 933d6ac. Consider uploading reports for the commit 933d6ac to get more accurate results

@@                Coverage Diff                @@
##           CrazyDynamics     #465      +/-   ##
=================================================
- Coverage          80.96%   80.92%   -0.04%     
=================================================
  Files                 85       85              
  Lines               9240     9249       +9     
=================================================
+ Hits                7481     7485       +4     
- Misses              1759     1764       +5     
Impacted Files Coverage Δ
...examples/torque_driven_ocp/example_soft_contact.py 80.88% <ø> (ø)
bioptim/dynamics/dynamics_functions.py 96.19% <37.50%> (-2.34%) ⬇️
...mples/getting_started/example_implicit_dynamics.py 89.47% <50.00%> (ø)
bioptim/dynamics/configure_problem.py 90.20% <77.27%> (ø)
...torque_driven_ocp/maximize_predicted_height_CoM.py 86.79% <100.00%> (ø)
bioptim/limits/constraints.py 88.97% <100.00%> (ø)
bioptim/misc/enums.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7178305...933d6ac. Read the comment docs.

@Ipuch
Copy link
Collaborator Author

Ipuch commented May 18, 2022

ready to be reviewed

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 10 files at r5, 1 of 4 files at r6, 9 of 9 files at r7, all commit messages.
Reviewable status: all files reviewed, 8 unresolved discussions (waiting on @Ipuch)


bioptim/dynamics/configure_problem.py line 109 at r7 (raw file):

        with_contact: bool = False,
        rigidbody_dynamics: Transcription = Transcription.ODE,
        soft_contacts_dynamics: Transcription = Transcription.ODE,

rigidbody_dynamics: RigidBodyDynamics = RigidBodyDynamics .ODE
soft_contacts_dynamics: SoftContactDynamics = SoftContactDynamics .ODE

Code quote:

        rigidbody_dynamics: Transcription = Transcription.ODE,
        soft_contacts_dynamics: Transcription = Transcription.ODE,

bioptim/dynamics/configure_problem.py line 133 at r7 (raw file):

            soft_contacts_dynamics != Transcription.CONSTRAINT
            and soft_contacts_dynamics != Transcription.ODE
            and nlp.model.nbSoftContacts() != 0

Put nbSoftContacts first


bioptim/dynamics/configure_problem.py line 140 at r7 (raw file):

        if rigidbody_dynamics == Transcription.CONSTRAINT_ID:
            if soft_contacts_dynamics == Transcription.ODE and nlp.model.nbSoftContacts() != 0:

Put soft contact in a factored if


bioptim/dynamics/configure_problem.py line 151 at r7 (raw file):

        ConfigureProblem.configure_qdot(nlp, True, False)
        ConfigureProblem.configure_tau(nlp, False, True, fatigue)
        if rigidbody_dynamics == Transcription.CONSTRAINT_FD or rigidbody_dynamics == Transcription.CONSTRAINT_ID:

LONG name


bioptim/dynamics/configure_problem.py line 153 at r7 (raw file):

        if rigidbody_dynamics == Transcription.CONSTRAINT_FD or rigidbody_dynamics == Transcription.CONSTRAINT_ID:
            ConfigureProblem.configure_qddot(nlp, False, True)
        if (

elif?


bioptim/dynamics/configure_problem.py line 259 at r7 (raw file):

            soft_contacts_dynamics != Transcription.CONSTRAINT
            and soft_contacts_dynamics != Transcription.ODE
            and nlp.model.nbSoftContacts() != 0

same


bioptim/examples/getting_started/example_implicit_dynamics.py line 78 at r7 (raw file):

    # Be careful to let the accelerations not to much bounded to find the same solution in implicit dynamics
    if rigidbody_dynamics == Transcription.CONSTRAINT_ID or rigidbody_dynamics == Transcription.CONSTRAINT_FD:

CONTRAINT_INVERSE_DYNAMICS


bioptim/misc/enums.py line 145 at r7 (raw file):

    ODE = "ode"
    CONSTRAINT = "constraint"
    CONSTRAINT_ID = "constraint_id"
class RigidBodyDynamics(Enum):
    ODE = "ode"
    DAE_INVERSE_DYNAMICS = "dae_inverse_dynamics"
    DAE_FORWARD_DYNAMICS = "dae_forward_dynamics"
    DAE_INVERSE_DYNAMICS_JERK = "dae_inverse_dynamics_jerk"
    DAE_FORWARD_DYNAMICS_JERK = "dae_forward_dynamics_jerk"

Code quote:

class Transcription(Enum):
    ODE = "ode"
    CONSTRAINT = "constraint"
    CONSTRAINT_ID = "constraint_id"
    CONSTRAINT_FD = "constraint_fd"
    CONSTRAINT_ID_JERK = "constraint_id_jerk"
    CONSTRAINT_FD_JERK = "constraint_fd_jerk"

Copy link
Collaborator Author

@Ipuch Ipuch left a comment

Choose a reason for hiding this comment

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

Reviewable status: 2 of 17 files reviewed, 8 unresolved discussions (waiting on @pariterre)


bioptim/dynamics/configure_problem.py line 109 at r7 (raw file):

Previously, pariterre (Pariterre) wrote…

rigidbody_dynamics: RigidBodyDynamics = RigidBodyDynamics .ODE
soft_contacts_dynamics: SoftContactDynamics = SoftContactDynamics .ODE

done.


bioptim/dynamics/configure_problem.py line 133 at r7 (raw file):

Previously, pariterre (Pariterre) wrote…

Put nbSoftContacts first

done


bioptim/dynamics/configure_problem.py line 140 at r7 (raw file):

Previously, pariterre (Pariterre) wrote…

Put soft contact in a factored if

done


bioptim/dynamics/configure_problem.py line 151 at r7 (raw file):

Previously, pariterre (Pariterre) wrote…

LONG name

done


bioptim/dynamics/configure_problem.py line 153 at r7 (raw file):

Previously, pariterre (Pariterre) wrote…

elif?

done


bioptim/dynamics/configure_problem.py line 259 at r7 (raw file):

Previously, pariterre (Pariterre) wrote…

same

done


bioptim/examples/getting_started/example_implicit_dynamics.py line 78 at r7 (raw file):

Previously, pariterre (Pariterre) wrote…

CONTRAINT_INVERSE_DYNAMICS

Done


bioptim/misc/enums.py line 145 at r7 (raw file):

Previously, pariterre (Pariterre) wrote…
class RigidBodyDynamics(Enum):
    ODE = "ode"
    DAE_INVERSE_DYNAMICS = "dae_inverse_dynamics"
    DAE_FORWARD_DYNAMICS = "dae_forward_dynamics"
    DAE_INVERSE_DYNAMICS_JERK = "dae_inverse_dynamics_jerk"
    DAE_FORWARD_DYNAMICS_JERK = "dae_forward_dynamics_jerk"

Done

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.

:lgtm:

Reviewed 15 of 15 files at r8, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Ipuch)

@pariterre pariterre merged commit 08f0109 into pyomeca:CrazyDynamics May 19, 2022
@Ipuch Ipuch deleted the CrazyDynamics_terminology branch June 9, 2022 20:58
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.

None yet

2 participants