@@ -121,15 +121,22 @@ solve_time(lr)
121121# and exploit the fact that the lagrangian is a degree-4 polynomial to streamline
122122# the linesearch.
123123# We need to use `square_scalars` as SDPLRPlus only supports free variables.
124+ # The default value of SDPLR for `rho_f` is `1e-5`. In SDPLRPlus
125+ # the corresponding setting is `ptol` so we set it `1e-5` as well.
126+ # SDPLRPlus also checks the duality gap to automatically update the rank.
127+ # We can disable this by setting `objtol` to `Inf`
128+ # Since we set the `objtol` to `Inf`, no need to find a trace bound to set
129+ # to `prior_trace_bound`
124130
125131import SDPLRPlus
126132set_optimizer(cl, dual_optimizer(LRO. Optimizer))
127133set_attribute(cl, " solver" , LRO. BurerMonteiro. Solver)
128134set_attribute(cl, " sub_solver" , SDPLRPlus. Solver)
129135set_attribute(cl, " ranks" , [15 ])
130- set_attribute(cl, " maxmajoriter" , 5 )
136+ set_attribute(lr, " ptol" , 1e-5 )
137+ set_attribute(lr, " objtol" , Inf )
138+ set_attribute(lr, " maxmajoriter" , 100 )
131139set_attribute(cl, " square_scalars" , true )
132- set_attribute(cl, " prior_trace_bound" , 10.0 )
133140optimize!(cl)
134141
135142# We can speed it up with sparse low-rank constraints:
@@ -138,9 +145,10 @@ set_optimizer(lr, dual_optimizer(LRO.Optimizer))
138145set_attribute(lr, " solver" , LRO. BurerMonteiro. Solver)
139146set_attribute(lr, " sub_solver" , SDPLRPlus. Solver)
140147set_attribute(lr, " ranks" , [15 ])
148+ set_attribute(lr, " ptol" , 1e-5 )
149+ set_attribute(lr, " objtol" , Inf )
141150set_attribute(lr, " maxmajoriter" , 100 )
142151set_attribute(lr, " square_scalars" , true )
143- set_attribute(lr, " prior_trace_bound" , 10.0 )
144152optimize!(lr)
145153termination_status(lr)
146154objective_value(lr)
0 commit comments