{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/a-learning-based-algorithm-to-quickly-compute","title":"A learning-based algorithm to quickly compute good primal solutions for Stochastic Integer Programs","arxiv_id":"1912.08112","date":"2019-12-17","proceeding":null,"authors":["Yoshua Bengio","Emma Frejinger","Andrea Lodi","Rahul Patel","Sriram Sankaranarayanan"],"abstract":"We propose a novel approach using supervised learning to obtain near-optimal primal solutions for two-stage stochastic integer programming (2SIP) problems with constraints in the first and second stages. The goal of the algorithm is to predict a \"representative scenario\" (RS) for the problem such that, deterministically solving the 2SIP with the random realization equal to the RS, gives a near-optimal solution to the original 2SIP. Predicting an RS, instead of directly predicting a solution ensures first-stage feasibility of the solution. If the problem is known to have complete recourse, second-stage feasibility is also guaranteed. For computational testing, we learn to find an RS for a two-stage stochastic facility location problem with integer variables and linear constraints in both stages and consistently provide near-optimal solutions. Our computing times are very competitive with those of general-purpose integer programming solvers to achieve a similar solution quality.","url_abs":"https://arxiv.org/abs/1912.08112v1","url_pdf":"https://arxiv.org/pdf/1912.08112v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"a-learning-based-algorithm-to-quickly-compute","repo_url":"https://github.com/ds4dm/nectar","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1912.08112","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1912.08112"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ds4dm/nectar","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":7},"by_repo_kind":{"listed":{"samples":7,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"de35dd466a1676a6","entry":"extract_scenario_features","repo":"ds4dm/nectar","repo_kind":"listed","path":"nectar/data_manager/cflp/generate_dataset.py","file_url":"https://github.com/ds4dm/nectar/blob/HEAD/nectar/data_manager/cflp/generate_dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"de35dd466a1676a6"}},{"code_sha256_prefix":"2bfc1467df383a6b","entry":"fetch_scenario","repo":"ds4dm/nectar","repo_kind":"listed","path":"nectar/data_manager/cflp/generate_dataset.py","file_url":"https://github.com/ds4dm/nectar/blob/HEAD/nectar/data_manager/cflp/generate_dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2bfc1467df383a6b"}},{"code_sha256_prefix":"e28583d5b03a9a17","entry":"generate_first_stage_cost","repo":"ds4dm/nectar","repo_kind":"listed","path":"nectar/data_manager/cflp/generate_instance.py","file_url":"https://github.com/ds4dm/nectar/blob/HEAD/nectar/data_manager/cflp/generate_instance.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e28583d5b03a9a17"}},{"code_sha256_prefix":"72c0e9dd79cca315","entry":"generate_second_stage_cost","repo":"ds4dm/nectar","repo_kind":"listed","path":"nectar/data_manager/cflp/generate_instance.py","file_url":"https://github.com/ds4dm/nectar/blob/HEAD/nectar/data_manager/cflp/generate_instance.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"72c0e9dd79cca315"}},{"code_sha256_prefix":"63739e6f53e9c218","entry":"get_first_ordered_facility_with_bounded_demand_in_xi_hat","repo":"ds4dm/nectar","repo_kind":"listed","path":"nectar/data_manager/cflp/generate_xi_hat.py","file_url":"https://github.com/ds4dm/nectar/blob/HEAD/nectar/data_manager/cflp/generate_xi_hat.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"63739e6f53e9c218"}},{"code_sha256_prefix":"2f209f9ef60ef70d","entry":"get_max_diff_ordered_facilities","repo":"ds4dm/nectar","repo_kind":"listed","path":"nectar/data_manager/cflp/generate_xi_hat.py","file_url":"https://github.com/ds4dm/nectar/blob/HEAD/nectar/data_manager/cflp/generate_xi_hat.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2f209f9ef60ef70d"}},{"code_sha256_prefix":"5dbef004e2cd8871","entry":"normalize_scenario","repo":"ds4dm/nectar","repo_kind":"listed","path":"nectar/data_manager/cflp/generate_dataset.py","file_url":"https://github.com/ds4dm/nectar/blob/HEAD/nectar/data_manager/cflp/generate_dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5dbef004e2cd8871"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}