커뮤니티

이격도 조건 제대로 작동하지 않는 것 같습니다.

프로필 이미지
끌레어주
2019-03-18 11:04:37
339
글번호 127136
답변완료
이격도 조건을 추가했는데 수식이 잘못 됐는지 잘 작동하지 않는 것 같습니다. 한번 봐주시면 감사하겠습니다. input : P1(3),P2(5),P3(10),P4(20); var1 = Disparity(P1); var2 = Disparity(P2); var3 = Disparity(P3); var4 = Disparity(P4); Condition1 = M >= 5000000000; Condition2 = h[1] > h; Condition3 = O < C; Condition4 = 1.2*C[1] >= C; Condition5 = C <= 20000; if 102.5 <= var1 and var1 <= 107.5 then Condition6 = True; if 102.5 <= var2 and var2 <= 107.5 then Condition7 = True; if 102.5 <= var3 and var3 <= 107.5 then Condition8 = True; if 102.5 <= var4 and var4 <= 107.5 then Condition9 = True; if Condition1 and Condition2 and Condition3 and Condition4 and Condition5 and (Condition6 or Condition7 or Condition8 or Condition9) Then find(1);
종목검색
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-03-18 16:17:54

안녕하세요 예스스탁입니다. if 102.5 <= var1 and var1 <= 107.5 then Condition6 = True; 변수는 값이 한번 저장되면 다음에 변경될때가지 값을 유지합니다. 조건이 만족하지 않으면 false를 저장하는 내용이 없습니다. if 102.5 <= var1 and var1 <= 107.5 then Condition6 = True; Else Condition6 = false; if 102.5 <= var2 and var2 <= 107.5 then Condition7 = True; Else Condition7 = false; if 102.5 <= var3 and var3 <= 107.5 then Condition8 = True; Else Condition8 = false; if 102.5 <= var4 and var4 <= 107.5 then Condition9 = True; Else Condition9 = false; 즐거운 하루되세요 > 끌레어주 님이 쓴 글입니다. > 제목 : 이격도 조건 제대로 작동하지 않는 것 같습니다. > 이격도 조건을 추가했는데 수식이 잘못 됐는지 잘 작동하지 않는 것 같습니다. 한번 봐주시면 감사하겠습니다. input : P1(3),P2(5),P3(10),P4(20); var1 = Disparity(P1); var2 = Disparity(P2); var3 = Disparity(P3); var4 = Disparity(P4); Condition1 = M >= 5000000000; Condition2 = h[1] > h; Condition3 = O < C; Condition4 = 1.2*C[1] >= C; Condition5 = C <= 20000; if 102.5 <= var1 and var1 <= 107.5 then Condition6 = True; if 102.5 <= var2 and var2 <= 107.5 then Condition7 = True; if 102.5 <= var3 and var3 <= 107.5 then Condition8 = True; if 102.5 <= var4 and var4 <= 107.5 then Condition9 = True; if Condition1 and Condition2 and Condition3 and Condition4 and Condition5 and (Condition6 or Condition7 or Condition8 or Condition9) Then find(1);