Adjust mu for bounds to promote Sparsity in Knitro Interior/Direct algorithm

I am using the Knitro solver, alg=1 (Interior/Direct) for my problem which tries to match a predicted matrix to an observed matrix. The predicted matrix should be sparse, and values should be between 0 and 1. I bound the values of this matrix to be between 0 and 1, but am finding that the interior solver does not like to give solutions that are on the boundary. Instead, it seems to push parameters inside the boundary, and then find a solution.

My understanding is the knitro solver imposes a penalty term, mu, when parameters approach the user-set boundaries. However it is important for my problem that solution parameters are allowed to live on the boundary.

Is there an option or argument I can pass in to the Knitro solver to turn off this mu penalty, or play with the penalty weight? I have tried using different bar_murule values to allow for adaptive mu’s to be set, but I would like more control in setting the tolerance and weights myself.

Knitro has a “crossover” feature that switches to an active set method near the end of the barrier iterations. It will tend to give a more extreme solution, which may be what you are looking for. In AMPL’s knitro_options string you can set, for example, bar_maxcrossit=1000 to specify that Knitro should execute up to 1000 active set method iterations at the end. There’s a more detailed explanation under bar_maxcrossit in the Knitro Reference Manual.