Solved! Go to Solution.
attr minA = 3 attr minB = 50 attr minC = 2 attr minD = 12 findMin(valList, index, min) = case (index < 0): min else: case(float(listItem(valList, index)) < min): findMin(valList, index-1, float(listItem(valList, index))) else: findMin(valList, index-1, min) findMin(valList) = findMin(valList, listSize(valList)-1, float(listItem(valList, listSize(valList)-1))) Shape --> print (findMin(str(minA) + ";" + str(minB) + ";" + str(minC) + ";" + str(minD) + ";") )
@Group("Model options",0) @Order(1) @Range("DoorA","DoorB","DoorC") attr type_of_door = "DoorA" doorUncertainty = case "DoorA" : 0.8 case "DoorB" : 0.9 else : 0.7 @Group("Model options",0) @Order(2) @Range("WindowA","WindowB","WindowC") attr type_of_door = "WindowA" windowUncertainty = case "WindowA" : 1 case "WindowB" : 0.6 else : 0.9 @Group("Model options",0) @Order(3) @Range("WallColorA","WallColorB","WallColorC") attr type_of_door = "WallColorA" wallColorUncertainty = case "WallColorA" : 0.2 case "WallColorB" : 0.5 else : 0.8
buildingUncertainty = min(doorUncertainty, windowUncertainty, wallColorUncertainty)
attr minA = 3 attr minB = 50 attr minC = 2 attr minD = 12 findMin(valList, index, min) = case (index < 0): min else: case(float(listItem(valList, index)) < min): findMin(valList, index-1, float(listItem(valList, index))) else: findMin(valList, index-1, min) findMin(valList) = findMin(valList, listSize(valList)-1, float(listItem(valList, listSize(valList)-1))) Shape --> print (findMin(str(minA) + ";" + str(minB) + ";" + str(minC) + ";" + str(minD) + ";") )