PEP8 and constraints

HI!

This PR does two things:
- some PEP8 adjustments (empty lines, spaces....)
- add some constraints and default values to ensure the model is always valid and so doesn't break the scheduler.