We can enable a feature of the Logistics module to Auto-Calculate the Function 'Capacity' field based on the Room Assignment/Layout - Capacity selected. To watch a tutorial of this feature, click here.
See additional screen shots below:

Select a 'Location' from the drop-down and click 'Add Room Assignments'
]Select the appropriate room(s) and corresponding layout(s). Click the 'Submit' button at the bottom of the page to save your selection(s).

The system will automatically update the Function 'Capacity' field:

The updated capacity will show on the 'Edit Function' screen:

You can manually overwrite the 'Capacity' field, if needed.
NOTE: if you edit the 'Room Assignment' after you overwrite the 'Capacity', the system will still auto-calculate the capacity, which may overwrite your manual changes.