Which one specify the solving time: constraint definition or solving the objective function

(Tajiki) #1

when I check the execution time of the statements between the cvx_begin and cvx_end the most time consuming parts are “constraint definition”; but the final method which is minimize(objectiveFunction) is really fast. Can i say the solving time of my program is low while the problem transformation is high?
If the answer is yes, then is it possible to change the value of constant parameters after the problem definition phase, and just run the final method without spending time for recalculation of problem definition phase?
Best regards.

(Michael C. Grant) #2

The model transformation process is everything that happens from the cvx_begin statement, until the solver actually starts. Even cvx_end does a certain amount of problem transformation.

No, there is no way to avoid this cost when solving a second or third problem. Every model is constructed fresh.