Port of the SimMetrics Java library to JavaScript and optimized.