You'd need to learn how to program, and add then run a little prgoram with about a million variables for things like training, morale, terrain, attrition, armament, equipment, physical strength, cover, surprise, formation, number of units, discipline.
What exactly is this for?
PD, for a more simple approach, almost any RTS comes with a World Builder that allows you to do something similar.