Splinterz, Dwarf Therapist seems to have trouble finding squads at the moment.
Thistle, how hard do you think it would be to modify the optimization plan engine so that it allows you to optimize a certain number of dwarves out of a set? For instance, I select thirty dwarves, make an optimization plan that finds the ten best marksmen of any large-enough selection, and then run that script.
Ratio-based selection is useful when you want to quickbuild an industry out of a certain group of dwarves, but is limited in that you can't smartly control how many dwarves you get. You use a predefined group and then distribute jobs within this group; it's easy to select a group of the best candidates for one job, with sorting by role rating, but it's difficult to select a group of the best candidates for a bunch of them. You can do this by defining a custom role that has all of the properties of all of the labors you want to assign, but you have to A, write this role, and B, implemented in a view somewhere.
A numerical optimizer would solve this problem by doing it for you automatically. How I envision it working:
- The optimizer takes all of the roles used in the optimization plan, and mashes them together into a temporary custom role.
- It sorts the selected dwarves by their fitness in this role, and then selects the top X dwarves out of this selection, where X is the number of dwarves to undergo optimization, as defined by the user in the plan.
- It does the standard optimization crunch on these dwarves.
What do you think?
^ Thistle.
Maybe I don't understand the question, but it seems to do that already.
You can select just a group of dwarf's, say 30, and apply an optmization plan, and if you wanted it to be say 10 out of 30, (and you selected, 30) you could set the % jobs to assign to 33% and it would assign the top 33% of 30 (aka top 10)
you can also do tricks like limit # of labors per dwarf to 1 per dwarf, that shows you what THEIR BEST job is out of the jobs you've assigned in the opt plan
I don't want to have to go back in and edit the plan to fit the number of dwarves I have selected. What's the point of having a pre-defined optimization plan if every time I want to use it, I have to go back in and change the percentages? I want to be able to write a plan where I can create a certain number of dedicated dwarves from a pool of them. I want to be able to filter down my dwarves to those that are available for work, select them, and then apply an optimization plan to distribute a certain preset number of jobs between a certain preset number of dwarves. Yes, I can do that by doing math, and then editing the optimization plan, and THEN running it, but wouldn't it be great if Dwarf Therapist handled that for me?
Ahough it does sound like it would be simpler, from an implementation perspective, to dynamically "pick" the percentage of dwarves you want to optimize based on an absolute number, and then set the percentages from there. For instance, if I write a plan that calls for four dwarves to get optimized, the optimizer just divided that number by the number of dwarves selected to arrive at a job percentage and goes from there.
Edit: here's another problem: currently the labor optimizer turns off all of the labors assigned to dwarves that are optimized, even those that aren't picked for a job. This means that in order to implement the feature I am describing you would need to either A) do what I originally described, which is rather complicated or B) change this behavior so that dwarves that are not given a job by the optimizer are not labor-reset, and do the simpler operation I described above.
Edit 2: I've gone and opened up a few issues on your issue tracker, Splinterz. Should have told me about it earlier!