class_docstr: Cables are structures in engineering that support
  the applied transverse loads through the tensile
  resistance developed in its members.
  
  Cables are widely used in suspension bridges, tension
  leg offshore platforms, transmission lines, and find
  use in several other engineering applications.
  
  Examples
  ========
  A cable is supported at (0, 10) and (10, 10). Two point loads
  acting vertically downwards act on the cable, one with magnitude 3 kN
  and acting 2 meters from the left support and 3 meters below it, while
  the other with magnitude 2 kN is 6 meters from the left support and
  6 meters below it.
  
  >>> from sympy.physics.continuum_mechanics.cable import Cable
  >>> c = Cable(('A', 0, 10), ('B', 10, 10))
  >>> c.apply_load(-1, ('P', 2, 7, 3, 270))
  >>> c.apply_load(-1, ('Q', 6, 4, 2, 270))
  >>> c.loads
  {'distributed': {}, 'point_load': {'P': [3, 270], 'Q': [2, 270]}}
  >>> c.loads_position
  {'P': [2, 7], 'Q': [6, 4]}
class_docstr_tok: ["Cables","are","structures","in","engineering","that","support","the","applied","transverse","loads","through","the","tensile","resistance","developed","in","its","members",".","Cables","are","widely","used","in","suspension","bridges",",","tension","leg","offshore","platforms",",","transmission","lines",",","and","find","use","in","several","other","engineering","applications",".","Examples","========","A","cable","is","supported","at","(","0",",","10",")","and","(","10",",","10",")",".","Two","point","loads","acting","vertically","downwards","act","on","the","cable",",","one","with","magnitude","3","kN","and","acting","2","meters","from","the","left","support","and","3","meters","below","it",",","while","the","other","with","magnitude","2","kN","is","6","meters","from","the","left","support","and","6","meters","below","it",".",">",">",">","from","sympy.physics.continuum_mechanics.cable","import","Cable",">",">",">","c","=","Cable","(","(","'","A","'",",","0",",","10",")",",","(","'","B","'",",","10",",","10",")",")",">",">",">","c.apply_load","(","-1",",","(","'","P","'",",","2",",","7",",","3",",","270",")",")",">",">",">","c.apply_load","(","-1",",","(","'","Q","'",",","6",",","4",",","2",",","270",")",")",">",">",">","c.loads","{","'distributed","'",":","{","}",",","'point_load","'",":","{","'","P","'",":","[","3",",","270","]",",","'","Q","'",":","[","2",",","270","]","}","}",">",">",">","c.loads_position","{","'","P","'",":","[","2",",","7","]",",","'","Q","'",":","[","6",",","4","]","}"]
docstr: This method adds load to the cable.
  
  Parameters
  ==========
  
  order : Integer
      The order of the applied load.
  
          - For point loads, order = -1
          - For distributed load, order = 0
  
  load : tuple
  
      * For point loads, load is of the form (label, x, y, magnitude, direction), where:
  
      label : String or symbol
          The label of the load
  
      x : Sympifyable
          The x coordinate of the position of the load
  
      y : Sympifyable
          The y coordinate of the position of the load
  
      magnitude : Sympifyable
          The magnitude of the load. It must always be positive
  
      direction : Sympifyable
          The angle, in degrees, that the load vector makes with the horizontal
          in the counter-clockwise direction. It takes the values 0 to 360,
          inclusive.
  
  
      * For uniformly distributed load, load is of the form (label, magnitude)
  
      label : String or symbol
          The label of the load
  
      magnitude : Sympifyable
          The magnitude of the load. It must always be positive
  
  Examples
  ========
  
  For a point load of magnitude 12 units inclined at 30 degrees with the horizontal:
  
  >>> from sympy.physics.continuum_mechanics.cable import Cable
  >>> c = Cable(('A', 0, 10), ('B', 10, 10))
  >>> c.apply_load(-1, ('Z', 5, 5, 12, 30))
  >>> c.loads
  {'distributed': {}, 'point_load': {'Z': [12, 30]}}
  >>> c.loads_position
  {'Z': [5, 5]}
  
  
  For a uniformly distributed load of magnitude 9 units:
  
  >>> from sympy.physics.continuum_mechanics.cable import Cable
  >>> c = Cable(('A', 0, 10), ('B', 10, 10))
  >>> c.apply_load(0, ('X', 9))
  >>> c.loads
  {'distributed': {'X': 9}, 'point_load': {}}
docstr_tok: ["This","method","adds","load","to","the","cable",".","Parameters","==========","order",":","Integer","The","order","of","the","applied","load",".","-","For","point","loads",",","order","=","-1","-","For","distributed","load",",","order","=","0","load",":","tuple","*","For","point","loads",",","load","is","of","the","form","(","label",",","x",",","y",",","magnitude",",","direction",")",",","where",":","label",":","String","or","symbol","The","label","of","the","load","x",":","Sympifyable","The","x","coordinate","of","the","position","of","the","load","y",":","Sympifyable","The","y","coordinate","of","the","position","of","the","load","magnitude",":","Sympifyable","The","magnitude","of","the","load",".","It","must","always","be","positive","direction",":","Sympifyable","The","angle",",","in","degrees",",","that","the","load","vector","makes","with","the","horizontal","in","the","counter-clockwise","direction",".","It","takes","the","values","0","to","360",",","inclusive",".","*","For","uniformly","distributed","load",",","load","is","of","the","form","(","label",",","magnitude",")","label",":","String","or","symbol","The","label","of","the","load","magnitude",":","Sympifyable","The","magnitude","of","the","load",".","It","must","always","be","positive","Examples","========","For","a","point","load","of","magnitude","12","units","inclined","at","30","degrees","with","the","horizontal",":",">",">",">","from","sympy.physics.continuum_mechanics.cable","import","Cable",">",">",">","c","=","Cable","(","(","'","A","'",",","0",",","10",")",",","(","'","B","'",",","10",",","10",")",")",">",">",">","c.apply_load","(","-1",",","(","'","Z","'",",","5",",","5",",","12",",","30",")",")",">",">",">","c.loads","{","'distributed","'",":","{","}",",","'point_load","'",":","{","'","Z","'",":","[","12",",","30","]","}","}",">",">",">","c.loads_position","{","'","Z","'",":","[","5",",","5","]","}","For","a","uniformly","distributed","load","of","magnitude","9","units",":",">",">",">","from","sympy.physics.continuum_mechanics.cable","import","Cable",">",">",">","c","=","Cable","(","(","'","A","'",",","0",",","10",")",",","(","'","B","'",",","10",",","10",")",")",">",">",">","c.apply_load","(","0",",","(","'","X","'",",","9",")",")",">",">",">","c.loads","{","'distributed","'",":","{","'","X","'",":","9","}",",","'point_load","'",":","{","}","}"]
code: def apply_load(self, order, load):
      """
      This method adds load to the cable.
  
      Parameters
      ==========
  
      order : Integer
          The order of the applied load.
  
              - For point loads, order = -1
              - For distributed load, order = 0
  
      load : tuple
  
          * For point loads, load is of the form (label, x, y, magnitude, direction), where:
  
          label : String or symbol
              The label of the load
  
          x : Sympifyable
              The x coordinate of the position of the load
  
          y : Sympifyable
              The y coordinate of the position of the load
  
          magnitude : Sympifyable
              The magnitude of the load. It must always be positive
  
          direction : Sympifyable
              The angle, in degrees, that the load vector makes with the horizontal
              in the counter-clockwise direction. It takes the values 0 to 360,
              inclusive.
  
  
          * For uniformly distributed load, load is of the form (label, magnitude)
  
          label : String or symbol
              The label of the load
  
          magnitude : Sympifyable
              The magnitude of the load. It must always be positive
  
      Examples
      ========
  
      For a point load of magnitude 12 units inclined at 30 degrees with the horizontal:
  
      >>> from sympy.physics.continuum_mechanics.cable import Cable
      >>> c = Cable(('A', 0, 10), ('B', 10, 10))
      >>> c.apply_load(-1, ('Z', 5, 5, 12, 30))
      >>> c.loads
      {'distributed': {}, 'point_load': {'Z': [12, 30]}}
      >>> c.loads_position
      {'Z': [5, 5]}
  
  
      For a uniformly distributed load of magnitude 9 units:
  
      >>> from sympy.physics.continuum_mechanics.cable import Cable
      >>> c = Cable(('A', 0, 10), ('B', 10, 10))
      >>> c.apply_load(0, ('X', 9))
      >>> c.loads
      {'distributed': {'X': 9}, 'point_load': {}}
      """
      if order == -1:
          if len(self._loads["distributed"]) != 0:
              raise ValueError("Distributed load already exists")
  
          label = load[0]
          if label in self._loads["point_load"]:
              raise ValueError("Label already exists")
  
          x = sympify(load[1])
          y = sympify(load[2])
  
          if x > self._right_support[0] or x < self._left_support[0]:
              raise ValueError(
                  "The load should be positioned between the supports"
              )
  
          magnitude = sympify(load[3])
          direction = sympify(load[4])
  
          self._loads["point_load"][label] = [magnitude, direction]
          self._loads_position[label] = [x, y]
  
      elif order == 0:
          if len(self._loads_position) != 0:
              raise ValueError("Point load(s) already exist")
  
          label = load[0]
          if label in self._loads["distributed"]:
              raise ValueError("Label already exists")
  
          magnitude = sympify(load[1])
  
          self._loads["distributed"][label] = magnitude
  
      else:
          raise ValueError("Order should be either -1 or 0")
  
file_path: sympy/sympy/physics/continuum_mechanics/cable.py
imports: from sympy.core.sympify import sympify
  from sympy.core.symbol import Symbol
label_desc: Use image node_id 11 for calling the Cable obj's underlying member method code with example usage: obj.apply_load(order, load) without return types