I was looking at the page help with the same title as this thread: https://help.anylogic.com/index.jsp?topic=%2Fcom.anylogic.help%2Fhtml%2Fdata%2FSort_Collection.html
As shown in the page, if you want to sort a list in increasing or decreasing order you used sortAscending or sortDescending. In the example included, a list of people is sorted by age or time and by income the other time.
List sortedByAgeAsc = sortAscending( people, p -> p.age );
List sortedByIncomeDesc = sortDescending( people, p -> p.income );
What if I want to sort a list by two fields at the same time? Like in this people list I want to sort by ascending income and descending age so the first element of the sorted list to be the oldest person with lowest income. If I run them one after another is the same after just running the second one. I tried to use and operator inside one statement but that didn't work