Partial implementation of a physical valve. The interpretation of input u_in depends on invertInput as follows.
u_in
invertInput
invertInput = false
invertInput = true