====== Labs ====== The goal of the labs is to exercise the topics presented on lectures. On some labs you will receive homework assignment, which are implementation of an algorithm or a method solving some interesting combinatorial optimization problem. In all cases, the solutions to homework assignments are submitted to [[https://cw.felk.cvut.cz/brute/|Brute]] where they are automatically checked and evaluated. Late upload will be penalized by -1 point for each week after deadline. Completing all homeworks successfully (i.e., the output is classified as //correct// according to Brute) is a mandatory requirement for the assessment. Moreover, we encourage you to solve the homeworks since in the practical test you will use algorithms implemented for the homeworks. ===== Plan of the Labs ===== ^ Week No. ^ Title ^ Notes ^ Materials ^ | 1 | Introduction, Gurobi installation, LP basics | | {{ :courses:ko:2025_lab01_grading_and_rules.pdf | Grading and Rules}} \\ {{ :courses:ko:2025_lab01_gurobi_installation_guide.pdf | Gurobi Installation Guide}} \\ {{ :courses:ko:2025_lab01_gurobi_example.zip | Gurobi Example (code)}} \\ Introduction: [[ https://colab.research.google.com/drive/1635gKL4Sp-_Y1PkQagsjFt74wtWrLqKU?usp=sharing | Worksheet]], [[ https://colab.research.google.com/drive/1I3frh0Lhhk59maXQIvoRsbYV824ZYg3z?usp=sharing | Solution]] \\ Transportation: [[ https://colab.research.google.com/drive/1vRegLBA7Kc19Yu8s5XFHKD8D0dKVyRgl?usp=sharing | Worksheet]], [[ https://colab.research.google.com/drive/1PenAW4pRK5DiwZuomLuZMctBrw38ZsNR?usp=sharing | Solution]] | | 2 | ILP basics | CC-OPT | CoContest: {{ :courses:ko:2025_cocontest.pdf | Handout}}, {{ :courses:ko:2025-cocontest-public.zip | Public Instances}} \\ Basics: [[ https://colab.research.google.com/drive/1E4Q54yoIP2PXDP2pXlo4ijV9xOzLfpyc?usp=sharing | Worksheet]], [[ https://colab.research.google.com/drive/1-M-rjNcvrWH8g7NSN9Nn5ApilotIize-?usp=sharing | Solution]] \\ [[ https://www.gurobi.com/jupyter_models/?_sft_difficulty_level=beginner | Gurobi Official Interactive Examples]] \\ [[ https://www.wiley.com/en-us/Model+Building+in+Mathematical+Programming%2C+5th+Edition-p-9781118443330 | Mathematical Programming Book with Examples ]] | | 3 | ILP 1 | HW1 | HW1: {{ :courses:ko:2025_hw1.pdf | Handout }}, [[ https://colab.research.google.com/drive/1w70DFyQU-qtYGnSE7OCCxqYyH1eYCRiT?usp=sharing | Worksheet ]], [[ https://colab.research.google.com/drive/1IpaW4vAS7WsKRGmo2nztIQjmPc6HBUn3?usp=sharing | Solution]], {{ :courses:ko:2025_hw1_public.zip | Public instances }} \\ Catering: [[ https://colab.research.google.com/drive/1_hGqDdLiTiyrCk5lxifSNjbLEgyDIxKG?usp=sharing | Worksheet ]], [[ https://colab.research.google.com/drive/1810qGeZvSc4OMSDVM1zN0l2gKM1Zjbja?usp=sharing | Solution]] \\ => video: [[ https://www.youtube.com/watch?v=zELw0vFn1Ag | Introduction]], [[ https://www.youtube.com/watch?v=_KrRTK3aWMQ | Solution]] \\ Tiles: [[ https://colab.research.google.com/drive/1dHubmtXao1c3O9q2_Jdb4Z0ZiR0xNGc5?usp=sharing | Worksheet ]], [[ https://colab.research.google.com/drive/1gdZD55KiMUAMO1KyPkqRNh2PK93j6sNz?usp=sharing | Solution]] \\ [[https://orinanobworld.blogspot.com/2011/07/perils-of-big-m.html | Blog about perils of big-M ]] | | 4 | ILP 2 | | Settle Up: [[ https://colab.research.google.com/drive/1PMfxzrG4CMx1X8TLJcShneyS55RlLzOj?usp=sharing | Worksheet ]], [[ https://colab.research.google.com/drive/1cQjuvcnHIhAMXuXJJwITwhY5ghUasDYm?usp=sharing | Solution ]] \\ => video: [[https://www.youtube.com/watch?v=Bk3_4xrYfxk&list=PLhMDoPPJXZWQr3a4IOw0FYVWEMq9w3t0J&index=3 | Introduction ]], [[ https://www.youtube.com/watch?v=ttee0c7ut1s&list=PLhMDoPPJXZWQr3a4IOw0FYVWEMq9w3t0J&index=5 | Solution]] \\ Peaking Power Plants: [[ https://colab.research.google.com/drive/1MIG7gFD5jYnZw1JAffZ-kJ1riApEtrPZ?usp=sharing | Worksheet ]], [[ https://colab.research.google.com/drive/1jS5QlfEGb_9IwLYSAKz_WzcqCdY76EJC?usp=sharing | Solution ]] \\ => video: [[ https://www.youtube.com/watch?v=2eu-TRY6I88&list=PLhMDoPPJXZWQr3a4IOw0FYVWEMq9w3t0J&index=6 | Introduction ]], [[ https://www.youtube.com/watch?v=ZxXRYcBDrM8&list=PLhMDoPPJXZWQr3a4IOw0FYVWEMq9w3t0J&index=8 | Solution ]] \\ Tents: [[ https://colab.research.google.com/drive/1hK9Pk_Ve-6i6kGb1mbD9cOEYsZYYMC60?usp=sharing | Worksheet ]], [[ https://colab.research.google.com/drive/16and0I-TNYV0vvyGZd1myMQZHeLZmXpl?usp=sharing | Solution ]] \\ => video: [[https://www.youtube.com/watch?v=U7_vIpIT3Ew&list=PLhMDoPPJXZWQr3a4IOw0FYVWEMq9w3t0J&index=7 | Introduction ]], [[ https://www.youtube.com/watch?v=ZmWZ3oNmmU4&list=PLhMDoPPJXZWQr3a4IOw0FYVWEMq9w3t0J&index=9 | Solution ]] | | 5 | ILP 3 | HW2 \\ CC-T \\ CC-R \\ **Deadline HW1** | CoContest Threshold and Ranking: {{ :courses:ko:2025-cocontest-public-threshold.zip | Public Instances}} \\ HW2: {{ :courses:ko:2025_hw2.pdf | Handout }}, {{ :courses:ko:2025_hw2_public.zip | Public Instances }} \\ => video: [[https://www.youtube.com/watch?v=olPrgTulvyI | Introduction]] \\ Lazy Constraints: {{ :courses:ko:2025_lab05.pdf | Handout }}, [[ https://colab.research.google.com/drive/1ReW-ejA9FIMNOtIvBq-WYJZnmmy0RqoU?usp=sharing | Visualization ]] \\ => video: [[ https://www.youtube.com/watch?v=3dtkmEwB_N0 | Introduction ]] | | 6 | Interesting ILP applications | | Game of Fivers: [[ https://rtime.felk.cvut.cz/~novakan9/ko/fivers.html | Game ]], {{ :courses:ko:2025_ilp_fivers.pdf | Handout }}, [[https://colab.research.google.com/drive/1E1zBjFBRltK2wXKiLSQ1nsDKR78TY7kf?usp=sharing | Worksheet ]], [[ https://colab.research.google.com/drive/1rjn639WTVzYWwSly_hdOWNVtDByh6LoR?usp=sharing | Solution]] \\ => video: [[https://www.youtube.com/watch?v=RTqgBaKgQHE | Introduction and Solution ]] \\ Verification of DNNs: [[https://colab.research.google.com/drive/1KvE7-hgS8X2F7GUfQsfRVwoVAXvbGehw?usp=sharing | Worksheet ]] \\ => video: [[https://www.youtube.com/watch?v=VFHqi7hL7E8 | Introduction and Solution]] \\ Rubic's Cube: [[https://colab.research.google.com/drive/1Iuj9fP3Mgb7U9HOGpvQKjeH5DbnCUgwz?usp=sharing | Worksheet ]] \\ => video: [[https://www.youtube.com/watch?v=Q-6QToN62Rc | Introduction and Solution ]] | | 7 | **Practical test**| **Deadline HW2** | Training Test: {{:courses:ko:2025_practice_test.pdf | Handout}}, {{:courses:ko:2025_practice_test_public.zip | Public Instances}} | | 8 | Max-Flow | HW3 \\ **Deadline CC-OPT** | Max-Flow: {{:courses:ko:2025_max_flow.pdf | Handout}} \\ => video: [[ https://www.youtube.com/watch?v=pWUKhsZt18E | Introduction, Solution, and HW3 ]] \\ HW3: {{ :courses:ko:2025_hw3.pdf | Handout }}, {{ :courses:ko:2025_hw3_public.zip | Public Instances }} \\ => video: [[ https://www.youtube.com/watch?v=Gxb6gMVosuc | Initial Feasible Flow for FF ]] | | 9 | Metaheuristics, consultations | | Metaheuristics: [[ https://colab.research.google.com/drive/1NHsmcSuZ4enlfAQvdD8-GfHyk0ySlDFG?usp=sharing | Worksheet ]], [[ https://colab.research.google.com/drive/1_Thl8IjWLtQe38NwKe1wo3iCHoqjuPaA?usp=sharing | Solution ]] \\ Shortest Paths: {{:courses:ko:2025_shortest_paths.pdf | Handout }}, [[https://colab.research.google.com/drive/1JUOs4AwLuRITQXWFIviusFKBZ6wI6MhF?usp=sharing | Worksheet ]] \\ Circle Packing: [[ https://colab.research.google.com/drive/1e56Zo3P0xejwcFwH3bwmvnW-d9ukVgCY?usp=sharing | Worksheet Gurobi]], [[https://colab.research.google.com/drive/1AlDWOa5WQFMhlDK4-Be1genhZ2Xqsxym?usp=sharing | Worksheet EvoTorch]] | | 10 | Min-Cost Flow | HW4 \\ **Deadline HW3** | Minimum Cost Flow: {{ :courses:ko:2025_min_cost.pdf | Handout }}, [[https://colab.research.google.com/drive/1OCeWhzMf-05FBkZb-bcaV3NjtKH451za?usp=sharing | Worksheet Images ]], [[ https://colab.research.google.com/drive/1zyIa5artTqO4qhpEb0B8J948-Y0rkfPn?usp=sharing | Worksheet Pipes ]] \\ => video: [[https://www.youtube.com/watch?v=8D63o5ruIFQ&list=PLhMDoPPJXZWQr3a4IOw0FYVWEMq9w3t0J&index=18 | Introduction ]] \\ HW4: {{ :courses:ko:2025_hw4.pdf | Handout }}, {{ :courses:ko:2025_hw4_public.zip | Public Instances }} | | 11 + 12 | Scheduling - Bratley's algorithm | HW5 \\ **Deadline HW4** | Bratley's algorithm and HW5: {{ :courses:ko:2025_hw5.pdf | Handout }}, {{ :courses:ko:2025_hw5_public.zip | Public Instances }}, [[ http://schedulingzoo.lip6.fr/ | The Scheduling Zoo ]] \\ => video: [[ https://www.youtube.com/watch?v=kbQ0J6I72Ww&list=PLhMDoPPJXZWQr3a4IOw0FYVWEMq9w3t0J&index=18 | Introduction ]] \\ Dynamic Programming: {{ :courses:ko:2025_dp.pdf | Handout }} | | 13 | Consultation, selected topics | **Deadline CC-T** \\ **Deadline CC-R** | Game of Life: [[ https://colab.research.google.com/drive/1hu-V77xGs57NFNa-W19AEqh2yArdbjdK?usp=sharing | Worksheet ]] \\ Nonograms: [[ https://colab.research.google.com/drive/1HYPZZb6Oio_8ziI_l7Tu7MIn3DHsYlMe?usp=sharing | Worksheet ]] \\ Quantum Soldiers: [[ https://colab.research.google.com/drive/1WXI0zjFHuso--i_cGEsMSRx8McwaQdDo?usp=sharing | Worksheet ]] | | 14 | Ungraded assessments, SP presentations, \\ CC-R results, modeling master class | **Deadline HW5** | Constraint Programming: [[ https://colab.research.google.com/drive/1k6EUNw4f471nXvB7e_Lilcq-5ESfTDcv?usp=sharing | Worksheet ]] \\ CoContest: {{:courses:ko:2025_cocontest_results.pdf | Results}} | ===== Classroom computers ===== //If possible, bring your own computer.// **OS**: Debian Linux 64bit, select Ubuntu during booting **Login**: uses credentials from Department of Computers. If you haven't use them before, setup them at https://www.felk.cvut.cz/labpass/ **Development environments**: CLion (C++), PyCharm (Python), GVim, Netbeans are installed. CLion and PyCharm are installed in ''/opt'' and their license have to be activated via creating JetBrains account with faculty email. **VPN**: Gurobi (Academic) licence can be obtained for free, but only from the university network; to access it remotely, you can use VPN - for more info see [[https://svti.fel.cvut.cz/cz/services/vpn.html | FEL VPN (CZ)]]/[[ https://svti.fel.cvut.cz/en/services/vpn.html | FEE VPN (EN)]].