Ok, I did quite a few changes now.
Moved the configuration to /configs/autoresearch for convenience
Added the option to enable/disable merging of turrets with different amounts of barrels
Added the option to disable research for specific tiers of weaponry/systems
Added the option to set a specific amount to use when researching a tier (ex: use 3 for common, 5 for legendary)
I am not quite happy with the code status but will work on it a bit more when I have more time :)
autoresearch.zip