====== 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 \\ [[https://www.youtube.com/watch?v=BYHOB7ojfMs&feature=youtu.be&ab_channel=industrialinformatics|Consultation 1 (Czech)]] | | {{ :courses:ko:grading_and_rules_2021.pdf | Grading and rules (pdf)}} \\ {{ :courses:ko:01_gurobi.pdf | Gurobi installation guide (pdf)}} \\ {{ :courses:ko:gurobi-examples.zip | Gurobi examples (zip)}} | | 2 | Semester Project, LP and ILP basics \\ [[https://youtu.be/jjUrpB1X8D0 | Consultation 2 (Czech)]] | CC | **CoContest**: {{ :courses:ko:cocontest_2021.pdf | Assignment}}, {{ :courses:ko:public_instances_cc_2021.zip |Public instances}} \\ **ILP Basics**: {{ :courses:ko:ilp_basics.pdf | Handout}}, {{ :courses:ko:ilp_basics.ipynb.zip | Jupyter}}, {{ :courses:ko:lab02_codes.zip | Solutions}}, {{ :courses:ko:lp_basics_wolfram_notebook.zip | Wolfram illustration}} \\ [[https://cw.fel.cvut.cz/old/_media/courses/a4b33opt/opt.pdf#part.3|Linear Programming, Duality (in Czech)]] | | 3 | ILP 1 \\ [[https://youtu.be/1qctL0F7D7g|Consultation 3 (Czech)]] | HW1 | **HW1**: {{ :courses:ko:03_ilp.pdf | Assignment}}, {{ :courses:ko:hw1_public_instances.zip | Public instances}} \\ **Settle up**: {{ :courses:ko:lab_5_settle_up.pdf | Handout}}, {{ :courses:ko:settle_up_todo.ipynb.zip | Jupyter}}, [[https://youtu.be/Bk3_4xrYfxk|Video]] \\ {{ :courses:ko:settle_up_models.zip | Solution (Jupyter)}}, [[https://youtu.be/ttee0c7ut1s|Solution (video)]] \\ **Catering**: {{ :courses:ko:the_catering_problem.pdf | Handout}}, {{ :courses:ko:catering_todo.zip | Jupyter}}, [[https://youtu.be/zELw0vFn1Ag|Video]] \\ {{ :courses:ko:catering-solution.zip |Solution (Jupyter)}}, [[https://youtu.be/_KrRTK3aWMQ|Solution (video)]] \\ [[https://orinanobworld.blogspot.com/2011/07/perils-of-big-m.html|Notes and issues with big M]]| | 4 | ILP 2 \\ [[https://youtu.be/rMyWpaIKI9A|Consultation 4 (Czech)]] | | **Tents in the Forest**: {{ :courses:ko:tents_in_the_forest.pdf | Handout}}, {{ :courses:ko:tents_in_the_forest.zip | Jupyter}}, [[https://youtu.be/U7_vIpIT3Ew| Video]] \\ {{ :courses:ko:tents.ipynb.zip |Solution (Jupyter)}}, [[https://youtu.be/ZmWZ3oNmmU4|Solution (video)]] \\ **Peaking Power Plants**: {{ :courses:ko:peaking_power_plants.pdf | Handout}}, {{ :courses:ko:peaking_power_plants.zip | Jupyter}}, [[https://youtu.be/2eu-TRY6I88|Video]] \\ {{ :courses:ko:peaking_power_plants.ipynb.zip |Solution (Jupyter)}}, [[https://youtu.be/ZxXRYcBDrM8|Solution (video)]] \\ | | 5 | Consultation \\ [[https://youtu.be/6sAQCTtRPt0|Consultation 5 (Czech)]] | | **Optional materials on SPT:** [[https://dl.acm.org/doi/10.1145/1275808.1276390|Content-aware image resizing via SPT]], {{ :courses:ko:06_stp.pdf | SPT (Handout)}}, {{ :courses:ko:czech_republic.txt |}}, {{ :courses:ko:image_approximation_skeleton.zip |}}| | 6 | ILP 3 \\ [[https://youtu.be/Xwvgdk5Kvhc|Consultation 6 (Czech)]] | | **Game of Fivers**: [[http://rtime.felk.cvut.cz/~novakan9/ko/fivers.html|Game]], [[https://youtu.be/RTqgBaKgQHE|Video]], {{:courses:ko:game_of_fivers.pdf|Handout}}, {{:courses:ko:game_of_fivers.zip|Jupyter (solved)}} \\ **Rubik's Cube**: [[https://youtu.be/Q-6QToN62Rc|Video]], {{:courses:ko:the_cube_of_rubik_and_ilp.pdf|Handout}}, {{:courses:ko:rubiks_optimal_ilp_jupyter.ipynb.zip|Jupyter (solved)}}\\ **Adversarial examples for DNN via ILP**: [[https://youtu.be/VFHqi7hL7E8|Video]], {{:courses:ko:adversarial_dnn_and_ilp.pdf|Handout}}, {{:courses:ko:adversarial_dnn_and_ilp.zip|Jupyter (solved)}} | | 7 | Network flows \\ [[https://youtu.be/SaY3m964Q3Q|Consultation 7 (Czech)]] | HW2 | {{ :courses:ko:maxflow-handout.pdf |Network flows handout (self study)}}, {{ :courses:ko:07_flows.pdf |Assignment of HW2}}, [[https://youtu.be/pWUKhsZt18E|Lab materials + HW2 (Video)]], [[https://youtu.be/Gxb6gMVosuc|Initial feasible flow for FF (Video)]], {{ :courses:ko:hw2_public_instances.zip |Public instances for HW2}} | | 8 | Consultation \\ [[https://youtu.be/Ss5iUkjF_2s|Consultation 8 (Czech)]] | | **Optional materials:** {{ :courses:ko:nonograms.pdf |Nonograms (PDF)}}, {{ :courses:ko:nonograms.zip |Nonograms (Jupyter)}} \\ {{ :courses:ko:handout_dynprog.pdf |Dynamic programming (self study)}} | | 9 | Minimum Cost Flows \\ [[https://youtu.be/pCCUII2C7PI|Consultation 9 (Czech)]] | HW3 |** Handout and HW3:** {{ :courses:ko:handout_mincost_flow.pdf |Handout (PDF)}}, {{ :courses:ko:09_mcf.pdf |Assignment of HW3}}, [[https://youtu.be/8D63o5ruIFQ|Lab materials and HW3 assignment (Video)]] {{ :courses:ko:hw3_public_instances.zip |Public instances}} \\ **Image reconstruction:** {{ :courses:ko:reconstruction_minflow.pdf |Solution (PDF)}}, {{ :courses:ko:image_reconstruction_jupyter.zip |Solution (Jupyter)}}| | 10 | Practical test \\ [[https://youtu.be/b3JIycWHf9Q|Consultation 10 (Czech)]]| | | | 11 | Traveling Salesman Problem \\ [[https://youtu.be/TXV-O7vnIpw|Consultation 11 (Czech)]] | HW4 | **Handout:** {{ :courses:ko:tsp-self-study.pdf |TSP handout (self study)}}, [[https://youtu.be/olPrgTulvyI|Lab materials and HW4 (Video)]] \\ **HW4:** {{ :courses:ko:11_tsp.pdf |Assignment of HW4}}, {{ :courses:ko:hw4_public_instances.zip |Public instances for HW4}} \\ **Lazy constraints:** [[https://youtu.be/3dtkmEwB_N0|Lazy constraints generation (Video)]], {{ :courses:ko:circle_approximation.py |Circle approximation (Python)}}, {{ :courses:ko:circle_wolfram.nb.zip |Circle approximation (Wolfram notebook)}} | | 12 | Bratley's problem \\ [[https://youtu.be/vwWaxGWv94I|Consultation 12 (Czech)]] | HW5 | **Bratley and HW5:** {{ :courses:ko:12_bratley.pdf | Handout (self study)}}, [[https://youtu.be/kbQ0J6I72Ww|Lab materials and HW5 (Video)]], {{ :courses:ko:hw5_public_instances.zip |Public instances for HW5}}, [[http://schedulingzoo.lip6.fr/|Scheduling ZOO]] | | 13 | ILP/CP master class \\ [[https://youtu.be/O9oGd7UqfsQ|Consultation 13 (Czech)]] | | **Handout:** {{ :courses:ko:13_ilp_cp_masterclass.pdf |Masterclass (PDF)}} | | 14 | Reserve | | | ===== Classroom computers ===== **OS**: Debian Linux 64b, 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++), IntelliJ (Java), PyCharm (Python), GVim, Netbeans are installed. CLion, IntelliJ 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)]].