code: def semidetached(b, component, solve_for=None, **kwargs):
      
      comp_ps = b.get_component(component=component)
  
      requiv = comp_ps.get_parameter(qualifier='requiv')
      requiv_critical = comp_ps.get_parameter(qualifier='requiv_max')
  
      if solve_for in [requiv, None]:
          lhs = requiv
          rhs = 1.0*requiv_critical
      else:
          raise NotImplementedError
  
      return lhs, rhs, {'component': component}
docs: Create a constraint to force requiv to be semidetached