Originally posted by: SystemAdmin
Assuming that you are using the callable library, I donot see a way around using the CPXchgctype() method for changing the variable types. If you have to change the types based only on the variable names, you could use the CPXgetcolname method (
status = CPXgetcolname (env, lp, cur_colname, cur_colnamestore,
cur_storespace, &surplus, 0,
cur_numcols-1);
), then create a indices array for the variables that you would like to change from continuous to binary, create a corresponding ctype array of 'B's and call the CPXchgctype() function.
#CPLEXOptimizers#DecisionOptimization