А на тему приоритетов - можно будет подумать на следующую сессию как внедрить... тут ведь 2 вопроса - как это реализовать в интерфейсе сайта для выбора целей, и потом сделать импорт для проги...
How do priorities work?
By default, TradeMaximizer does not use priorities. The moderator can choose to use priorities by specifying a priority scheme as an option (eg, LINEAR-PRIORITIES).
When using priorities, each wanted item in a want list is assigned a certain cost, where lower cost means higher priority. The system then uses cost as a tie-breaker among different ways of achieving the maximum number of trades. In particular, it finds the set of trades that has the minimum total cost, where total cost is the sum of the costs of all the individual items traded.
All priority schemes begin by finding the rank of each wanted item in a want list. The cost is then calculated as a function of rank.
In LINEAR-PRIORITIES, cost = rank.
In TRIANGLE-PRIORITIES, cost = 1+2+...+rank = rank*(rank+1)/2.
In SQUARE-PRIORITIES, cost = rank*rank.
In SCALED-PRIORITIES, cost = 1 + (rank-1)*2520/number of wants.
In the simplest case, rank is equal to the position of the item in the list. In other words, the first wanted item has rank 1, the second wanted item has rank 2, and so on.
The simple case can be altered in two ways. First, the moderator can set the SMALL-STEP=num option. This sets how much the rank increases when you move from one position to the next. (By default, the small-step value is 1.)
Second, the user can include a semicolon in a want list. A semicolon says "increase the rank of the next item by the big-step value". (The big-step value is 9 by default, but can be set by the moderator using the BIG-STEP=num option.)
For example, in the want list
A : B C ; D
item B has rank 1, item C has rank 2, and item D has rank 12, assuming the small-step value is 1 and the big-step value is 9. Notice that the gap in rank between items C and D is the small-step value plus the big-step value, not just the big-step value. If the small-step and big-step values were 0 and 100, respectively, then item C would have rank 1 and item D would have rank 101.
Multiple semicolons in a row are allowed, as are semicolons before the first wanted item.