Hmmm, I have more questions as well.
1. Are any items duplicate stats (perhaps with different skins)?
2. You mention you +1 str sword would work with +5 str helmet, is the stat cap simply limiting or restrictive? (does it have to equal EXACTLY cap value or does it ignore all values beyond cap?)
3. Are you looking for a single perfect solution or is it conceivable to have numerous amounts of perfect solutions?
Answers:
1) almost certainly yes.
2) values above the caps are ignored. They represent some amount of wasted augmentation, so should be minimized. But they probably should weigh less than values below the cap.
3) there would definitely be many possible "good" solutions and the tool would facilitate exploring the solution space, making changes and rerunning the search, etc.