It's actually a pretty simple problem if you ask for a reasonable output. The problem is that ions are in fixed proportions in the salts you can add to water so that it is very easy to ask for a profile that is not possible. Thus the problem becomes a "linear programming" problem in which a solution that is as close as possible to what you want is found.
It is fairly easy to put together a spreadsheet in which you enter the amounts of common salts (CaCl2, CaSO4, NaCl, MgSO4, MgCl, NaHC03...) acids and bases, specify the pH you want the formulation to be at and from that calculate what the concentrations of Ca++, HCO3-, SO4--, Cl-, CO3-- are. You take a stab at what you think the salt additions might be, have the spreadsheet calculate what the ion concentrations are, compare to the targets and then ask the Excel Solver to find the salt and acid amounts that minimize the error (definable in various ways). Voila - you have a fomulation.
This is easy enough to talk about but very difficult to do as the chemistry involved is very difficult to understand. There are, perhaps, 3 people on this forum who understand it. Many have tried to do what you want and wind up frustrated. Yes, it is possible. I have a spreadsheet which does this but it is, unfortunately, too complicated to be useful to anyone but its author.