How do I add sensors into equations to be manipulated and operated on?

I'm designing a model that needs a ratio of weight to buoyancy to be maximized. I have sensors named Mass1 etc. but they can't go into equations as a variable. is there a special syntax I am missing? 

I found a workaround where I split the masses into different part files and use SW-Mass in assembly. but I don't like it because it dissociates my input variables.

I am using SolidWorks 2020 premium.