code: public int getMessageLength() {
      // Message type, number of transients
      int length = 1 + 4;
      if (this.transientRequests != null) {
        for (OnDemandRequest request : this.transientRequests) {
          length += request.getLength();
        }
      }
  
      return length;
    }
docs: The length of this message when encoded according to the Solver-World Model
  protocol.
  
  @return the length, in bytes, of the encoded form of this message.