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

Damages and losses don't return the same number of rows (link based) #666

Open
2 tasks done
ArdtK opened this issue Dec 19, 2024 · 2 comments
Open
2 tasks done

Damages and losses don't return the same number of rows (link based) #666

ArdtK opened this issue Dec 19, 2024 · 2 comments
Labels
bug Something isn't working triage required Issues without priority assessment or milestone.

Comments

@ArdtK
Copy link
Contributor

ArdtK commented Dec 19, 2024

Ra2ce version checks

  • I have checked that this issue has not already been reported.
  • I have checked that this bug exists on the latest version of Ra2ce in master here.

Reproducible example

Run example_adaptation.
Damages: 230 rows
Losses 228 rows

Current behaviour

These lines are missing in the losses output
Image

Desired behaviour

The same amount of lines (with matching IDs) should be returned, identical to the IDs of the input (simplified graph used in losses)

Additional context

No response

@ArdtK ArdtK added bug Something isn't working triage required Issues without priority assessment or milestone. labels Dec 19, 2024
@ArdtK
Copy link
Contributor Author

ArdtK commented Dec 19, 2024

These statement in losses_base.py cause the 2 rows to get lost:

        if "key" in criticality_analysis.columns:
            criticality_analysis = criticality_analysis.drop_duplicates(
                ["u", "v", "key"]
            )
        else:
            criticality_analysis = criticality_analysis.drop_duplicates(["u", "v"])

This is because some rows have identical u,v(,key).
Image
Image

@ArdtK
Copy link
Contributor Author

ArdtK commented Dec 19, 2024

@sahand-asgarpour could you indicate what the right behavior would be?

  • Should it be possible to have 2 links between the same nodes?
  • What should be done when calling drop_duplicates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage required Issues without priority assessment or milestone.
Projects
None yet
Development

No branches or pull requests

1 participant