@@ -1944,7 +1944,9 @@ def addCablesConnections(self,connDict,cableType_def='dynamic_cable_66',oss=Fals
19441944 substation_r = [None ],ss_id = 200 ,id_method = 'location' ,
19451945 keep_old_cables = False , connect_ss = True ,
19461946 cableConfig = None , configType = 0 ,heading_buffer = 30 ,
1947- route_anchors = True , adj_dir = 1 ):
1947+ route_anchors = False , adj_dir = 1 ,
1948+ consider_alternate_side = False ):
1949+
19481950 '''Adds cables and connects them to existing platforms/substations based on info in connDict
19491951 Designed to work with cable optimization output designed by Michael Biglu
19501952
@@ -1974,6 +1976,14 @@ def addCablesConnections(self,connDict,cableType_def='dynamic_cable_66',oss=Fals
19741976 0 = default to dynamic-static-dynamic cables, 1 = default to suspended cable systems
19751977 heading_buffer : float, optional
19761978 Minimum buffer between moorings and cables (degrees). Default is 30
1979+ route_anchors: bool, optional
1980+ True=automatically route cables around anchors
1981+ adj_dir: int, optional
1982+ Control initial direction to adjust cable headings to avoid mooring anchors
1983+ 1 for positive angle adjustment, -1 for negative angle adjustment
1984+ consider_alternate_side: bool, optional
1985+ True- take into account mooring headings of platform on other side
1986+ if it is within 2 mooring radii
19771987
19781988 Returns
19791989 -------
@@ -2099,7 +2109,8 @@ def addCablesConnections(self,connDict,cableType_def='dynamic_cable_66',oss=Fals
20992109 msp = list (moors .values ())[0 ].span + attA .rFair + 200 # add a bit extra
21002110 # consider mooring headings from both ends if close enough
21012111 pfsp = np .linalg .norm (attA .r - attB .r )
2102- if pfsp - 2 * attA .rFair < msp + dc0s :
2112+
2113+ if consider_alternate_side and pfsp - 2 * attA .rFair < msp + dc0s :
21032114 headingA = head_adjust ([attA ,attB ],
21042115 headingA ,
21052116 rad_buff = rad_buff ,
0 commit comments