#17298 Add new functions in Models. Fix bugs in result. Test.