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

Value of ConstraintFcn cost print incorrect when the constraint is time based #874

Open
Kev1CO opened this issue May 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Kev1CO
Copy link
Collaborator

Kev1CO commented May 27, 2024

The output of sol.print_cost() returns an incorrect value of ConstraintFcn.STATE_CONTINUITY or ConstraintFcn.CUSTOM when time is involved. This error comes from the solution.py file.

`class Solution:

 def _get_penalty_cost():
        for idx in range(le(penalty.node_idx)):
                t0 = PenaltyHelphers.t0(penalty, idx, lambda p, n: self._stepwise_time[p][n][0]`

self._stepwise_time[p][n][0] the [0] is where it creates a mistake

@Ipuch Ipuch added the bug Something isn't working label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants