You can do
>var/volume = min(reagents.total_volume, reagents.maximum_volume)