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

Fixes #2161: #2162

Merged
merged 2 commits into from
Oct 30, 2023
Merged

Fixes #2161: #2162

merged 2 commits into from
Oct 30, 2023

Conversation

msevestre
Copy link
Member

@msevestre msevestre commented Oct 28, 2023

Fixes #2161

Description

Comparision of tables should be done by trying to find matching points by axis. Instead, two tables are equal when all points in their order are the same. So we needed to introduce a comparison by index

Type of change

Please mark relevant options with an x in the brackets.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires documentation changes (link at least one user or developer documentation issue):
  • Algorithm update - updates algorithm documentation/questions/answers etc.
  • Other (please describe):

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Integration tests
  • Unit tests
  • Manual tests
  • No tests required

Reviewer checklist

Mark everything that needs to be checked before merging the PR.

  • Check if the code is well documented
  • Check if the behavior is what is expected
  • Check if the code is well tested
  • Check if the code is readable and well formatted
  • Additional checks (document below if any)
  • Check if documentation update issue(s) are created if the option This change requires a documentation update above is selected

Screenshots (if appropriate):

Questions (if appropriate):

@msevestre msevestre requested a review from rwmcintosh October 28, 2023 02:48
@@ -88,9 +88,9 @@ public TableFormula(IInterpolation interpolation)
UseDerivedValues = true;
}

public virtual IEnumerable<ValuePoint> AllPoints() => _allPoints;
Copy link
Member Author

Choose a reason for hiding this comment

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

just garbage

var tableFormula = comparison.Object1.DowncastTo<TableFormula>();
return Captions.Comparisons.ValuePointAt(tableFormula.Name, formulaOwnerName, tableFormula.XDisplayValueFor(valuePoint.X));
//We do not use enumerable comparison here as we need to compare the values by index
_enumerableComparer.CompareEnumerablesByIndex(comparison, x => x.AllPoints);
Copy link
Member Author

Choose a reason for hiding this comment

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

here we compare by index. That way comparison of tables with two points with very close x axis does not fail for no reason

@msevestre msevestre requested a review from Yuri05 October 28, 2023 02:50
@msevestre
Copy link
Member Author

Once this is merge, I'll update PK-Sim

}

[Observation]
public void should_report_the_path_entries_and_different_entries_as_difference()
Copy link
Member

Choose a reason for hiding this comment

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

you mean should_not_report_the_path_entries_and_different_entries_as_difference right?

Copy link
Member Author

Choose a reason for hiding this comment

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

the name is copied from the previous method which was also wrong.

Copy link
Member

@rwmcintosh rwmcintosh left a comment

Choose a reason for hiding this comment

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

I think the observation method name just needs to be changed.

@msevestre msevestre merged commit 56ffb6d into develop Oct 30, 2023
@msevestre msevestre deleted the 2161-creating-two-default-indivudals-diff branch October 30, 2023 13:51
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.

Creating two default indivudals, diff
2 participants