Originally posted by: SystemAdmin
[EdKlotz said:]
before solving I need to give initial value for some given variable in my variable array. Note that I discuss some given variable in my variable array , not all variable in my variable array .For example, IloNumVarArray k; I want to k[t]=0,
k[j] is still unknown when t is not equal j.
Who can help me?
Are you solving a discrete or continuous model? For discrete models, CPLEX support partial MIP starts. You can specify some of your integer variable values by calling IloCplex::setVectors, and just specifying the variables and initial values you want to provide. CPLEX will use some heuristics to try to construct a complete solution from your partial list of starting values. Since an early integer feasible solution can potentially help the MIP optimization, this can yield performance improvements (although if CPLEX's heuristics don't succeed in completing the solution, you will have wasted a modest amount of runtime).
For continuous models, you can also use IloCplex::setVectors with a partial solution. But, while CPLEX will accept such a partial advanced start solution, it will set the starting values of the unspecified variables to 0, and try to construct a starting basis from that resulting vector. I doubt this will yield a good starting basis, and I suspect you are better off just letting CPLEX construct a starting basis from scratch. And, if you are using the barrier method, CPLEX won't use this information anyways.
#CPLEXOptimizers#DecisionOptimization