Skip to content

Commit 00f5c58

Browse files
committed
Small bug fix for double shared mooring line
- previously unable to have 2 shared lines going between the same turbines, because shared line IDs were platformIDA-platformIDB - now checks if line ID exists already before making a new shared line, adds letter at the end based on number of moorings conencted to platformB so it is always unique ragardless of # of common shared lines.
1 parent 012ada7 commit 00f5c58

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎fad/project.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,8 +619,12 @@ def loadDesign(self, d, raft=True):
619619
mdd = getMoorings(lineconfig, lineConfigs, connectorTypes,
620620
PF[0].id, self, lineProps=self.lineProps)
621621

622+
if not str(PF[1].id)+'-'+str(PF[0].id) in self.mooringList.keys():
623+
sid = str(PF[1].id)+'-'+str(PF[0].id)
624+
else:
625+
sid = str(PF[1].id)+'-'+str(PF[0].id)+alph[len(PF[1].getMoorings())]
622626
# create mooring class instance
623-
moor = self.addMooring(id=str(PF[1].id)+'-'+str(PF[0].id),
627+
moor = self.addMooring(id=sid,
624628
dd=mdd,
625629
shared=1)
626630

0 commit comments

Comments
 (0)