def get_params_from_cplex_version(cpx_version): # INTERNAL # returns a parameter tree depending on the cplex version, if any. # if none is found, returns a default version. if cpx_version is None: # this can happen, protect from startswith failure return _make_default_parameters() if cpx_version.startswith("12.6.2."): return make_root_params_12620() elif cpx_version.startswith("12.6.3."): return make_root_params_12630() elif cpx_version.startswith("12.7.0"): return make_root_params_12700() elif cpx_version.startswith("12.7.1"): return make_root_params_12710() elif cpx_version.startswith("12.8.0"): return make_root_params_12800() elif cpx_version.startswith("12.9.0"): return make_root_params_12900() elif cpx_version.startswith("12.10.0"): return make_root_params_121000() elif cpx_version.startswith("20.1.0"): return make_root_params_20100() else: return _make_default_parameters()
def _make_default_parameters(): params = make_root_params_121000() print("-- no cplex version found, using default parameter version: {0}". format(params.cplex_version)) return params
def _make_default_parameters(): return make_root_params_121000()