const cog = require('./bestCombination'); const bep = require('./bepGravitation'); // Pick the optimizer module by config string. // Anything other than the two BEP variants falls back to CoG. function pickOptimizer(method) { if (method === 'BEP-Gravitation' || method === 'BEP-Gravitation-Directional') return bep; return cog; } module.exports = { pickOptimizer, calcBestCombination: cog.calcBestCombination, calcBestCombinationBEPGravitation: bep.calcBestCombinationBEPGravitation, estimateSlopesAtBEP: bep.estimateSlopesAtBEP, redistributeFlowBySlope: bep.redistributeFlowBySlope, };