How to optimize complex heating rules

Is a good tutorial for a pretty comprehensive approach.

Design Pattern: How to Structure a Rule provides some help perhaps for dealing with the nested if/elses. For example, you can check for Holiday or Vacation mode up front and exit the Rule which eliminates one set of nesting.

But until you can build up the state machine and fully understand what you want to have happen for all of your conditions then you will never be able to build the code. So maybe draw a state diagram (see A State Machine Primer with HABlladin, the openHAB Genie and Washing Machine State Machine for examples) to map out all the conditions and appropriate states. Once it is all mapped out your Rule will be a bunch of same level if/else statements or switch statements.

This is the standard approach to a problem like this in programming.