
kohyoung_solver package only works in a Python 3.11 environment.
Other versions (3.10, 3.12, etc.) may cause import errors, so be sure to set up a virtual environment with Python 3.11.conda create -n iccas_contest python=3.11 or pyenv install 3.11| tl_x | tl_y | br_x | br_y | type | side | step | time | |
|---|---|---|---|---|---|---|---|---|
| 0 | 12 | 8 | 18 | 14 | 2 | 0 | 0 | 0 |
| 1 | 130 | 10 | 145 | 22 | 1 | 0 | 0 | 0 |
| 2 | 20 | 45 | 32 | 55 | 0 | 0 | 0 | 0.3 |
| 3 | 35 | 38 | 45 | 48 | 0 | 0 | 0 | 0.3 |
| 4 | 25 | 35 | 35 | 43 | 0 | 1 | 0 | 0.3 |
| 5 | 70 | 40 | 85 | 52 | 0 | 0 | 0 | 0.3 |
| 6 | 80 | 55 | 95 | 65 | 0 | 0 | 0 | 0.3 |
| 7 | 68 | 50 | 78 | 60 | 0 | 1 | 0 | 0.3 |
| 8 | 110 | 85 | 125 | 95 | 0 | 0 | 1 | 0.3 |
| 9 | 128 | 90 | 142 | 100 | 0 | 0 | 1 | 0.3 |
| pcb_x | pcb_y | fov_x | fov_y |
|---|---|---|---|
| 160 | 120 | 50 | 50 |
| capture_time | recon_time | side_capture_time | max_core | v_x | v_y | a_x | a_y |
|---|---|---|---|---|---|---|---|
| 0.5 | 0.5 | 0.25 | 8 | 1000 | 1000 | 9800 | 9800 |
| tl_x | tl_y | br_x | br_y | |
|---|---|---|---|---|
| 0 | 100 | 75 | 160 | 120 |
cover_all_components() detects uncovered components:error flag is set to 1| x (center) | y (center) | comp_idx | FOV Type | Side Component? | |
|---|---|---|---|---|---|
| 0 | 15 | 11 | [0] | 2 (Fid) | - |
| 1 | 138 | 16 | [1] | 1 (BC) | - |
| 2 | 30 | 40 | [2, 3, 4] | 0 | side=1 (#4) |
| 3 | 74 | 55 | [5, 6, 7] | 0 | side=1 (#7) |
| 4 | 126 | 93 | [8, 9] | 0 | - |
The AOI equipment uses a pipeline structure to perform capture, reconstruction, and inspection simultaneously. FOVs are processed in order, with reconstruction/inspection of the previous FOV overlapping with the capture of the next FOV.
python 2_run.py --solver greedy to compute the CT. Then run python 3_view.py --solver greedy --open to generate and open the result Viewer (result.html).
1. Constraint violation detected: If cover_all_components() or fov_inspection_order() returns FAIL, the penalty_solver is triggered.
2. Solver output discarded: The participant's output_fov.csv is completely ignored, and FOVs are re-placed from scratch using the greedy baseline solution below.
3. Greedy baseline solution: Fiducial-only FOVs → origin-distance sorted component placement at FOV top-left → absorb same-step neighbors → big component tiling → nearest neighbor path ordering.
2_run.py, if cover or order is False, c.penalty_solver() is automatically called.
Cover: PASS and Order: PASS!
When penalty_solver is applied, your optimization is discarded. Be sure to check the Cover/Order results in the 2_run.py output.

kohyoung_solver 패키지는 Python 3.11 환경에서만 동작합니다.
다른 버전(3.10, 3.12 등)에서는 import 오류가 발생할 수 있으니, 반드시 Python 3.11로 가상환경을 구성하세요.conda create -n iccas_contest python=3.11 또는 pyenv install 3.11| tl_x | tl_y | br_x | br_y | type | side | step | time | |
|---|---|---|---|---|---|---|---|---|
| 0 | 12 | 8 | 18 | 14 | 2 | 0 | 0 | 0 |
| 1 | 130 | 10 | 145 | 22 | 1 | 0 | 0 | 0 |
| 2 | 20 | 45 | 32 | 55 | 0 | 0 | 0 | 0.3 |
| 3 | 35 | 38 | 45 | 48 | 0 | 0 | 0 | 0.3 |
| 4 | 25 | 35 | 35 | 43 | 0 | 1 | 0 | 0.3 |
| 5 | 70 | 40 | 85 | 52 | 0 | 0 | 0 | 0.3 |
| 6 | 80 | 55 | 95 | 65 | 0 | 0 | 0 | 0.3 |
| 7 | 68 | 50 | 78 | 60 | 0 | 1 | 0 | 0.3 |
| 8 | 110 | 85 | 125 | 95 | 0 | 0 | 1 | 0.3 |
| 9 | 128 | 90 | 142 | 100 | 0 | 0 | 1 | 0.3 |
| pcb_x | pcb_y | fov_x | fov_y |
|---|---|---|---|
| 160 | 120 | 50 | 50 |
| capture_time | recon_time | side_capture_time | max_core | v_x | v_y | a_x | a_y |
|---|---|---|---|---|---|---|---|
| 0.5 | 0.5 | 0.25 | 8 | 1000 | 1000 | 9800 | 9800 |
| tl_x | tl_y | br_x | br_y | |
|---|---|---|---|---|
| 0 | 100 | 75 | 160 | 120 |
cover_all_components()가 미커버 부품을 감지하면:error 플래그가 1로 설정됩니다| x (중심) | y (중심) | comp_idx | FOV Type | Side 부품? | |
|---|---|---|---|---|---|
| 0 | 15 | 11 | [0] | 2 (Fid) | - |
| 1 | 138 | 16 | [1] | 1 (BC) | - |
| 2 | 30 | 40 | [2, 3, 4] | 0 | side=1 (#4) |
| 3 | 74 | 55 | [5, 6, 7] | 0 | side=1 (#7) |
| 4 | 126 | 93 | [8, 9] | 0 | - |
AOI 장비는 파이프라인 구조로 촬상·복원·검사를 동시에 진행합니다. FOV가 순서대로 처리되며, 이전 FOV의 복원/검사와 다음 FOV의 촬상이 겹칩니다.
python 2_run.py --solver greedy로 CT를 산출하고, python 3_view.py --solver greedy --open으로 결과 Viewer(result.html)를 생성·확인할 수 있습니다.
1. 제약 위반 감지: cover_all_components() 또는 fov_inspection_order()가 FAIL이면 penalty_solver가 동작합니다.
2. Solver 출력 폐기: 참가자의 solver가 출력한 output_fov.csv를 완전히 무시하고, 아래 그리디 기본 풀이로 처음부터 FOV를 재배치합니다.
3. 그리디 기본 풀이: Fiducial 단독 FOV → 원점 거리순으로 부품을 FOV 좌상단에 배치 → 같은 FOV에 들어가는 부품 흡수 → Big component 타일링 → Nearest neighbor 경로 결정.
2_run.py에서 cover 또는 order가 False이면 자동으로 c.penalty_solver()가 호출됩니다.
Cover: PASS, Order: PASS를 확인하세요!
penalty_solver가 적용되면 정상 최적화 대비 CT가 수배~수십배 증가합니다. 2_run.py 출력에서 Cover/Order 결과를 반드시 점검하세요.