Update compartment.py model to reflect current code changes