The solution is:
Drug decriminalization and the treatment of addiction as a health issue, not a criminal one.
Subsidized housing, rent controls and the conversion of now-empty office buildings into homes.
Job or income guarantee.
Security on the metro will just keep moving the homeless into other parts of the city, I remember how unhappy you were at them sleeping in the park.