The code for well index calculator can be found here https://github.com/PetroleumCyberneticsGroup/FieldOpt-WellIndexCalculator.
The code for the constraint handling can be found here: https://github.com/PetroleumCyberneticsGroup/FieldOpt/tree/develop/FieldOpt/ConstraintMath