{"id":31766126,"url":"https://github.com/ibmdecisionoptimization/decision-optimization-with-opl-cpo-samples","last_synced_at":"2026-02-15T20:04:25.958Z","repository":{"id":99125134,"uuid":"80832154","full_name":"IBMDecisionOptimization/Decision-Optimization-with-OPL-CPO-samples","owner":"IBMDecisionOptimization","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-03T16:42:19.000Z","size":536,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-10-10T00:31:12.382Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IBMDecisionOptimization.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-02-03T13:38:17.000Z","updated_at":"2022-09-26T04:16:48.000Z","dependencies_parsed_at":"2023-04-27T12:01:14.018Z","dependency_job_id":null,"html_url":"https://github.com/IBMDecisionOptimization/Decision-Optimization-with-OPL-CPO-samples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/IBMDecisionOptimization/Decision-Optimization-with-OPL-CPO-samples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBMDecisionOptimization%2FDecision-Optimization-with-OPL-CPO-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBMDecisionOptimization%2FDecision-Optimization-with-OPL-CPO-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBMDecisionOptimization%2FDecision-Optimization-with-OPL-CPO-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBMDecisionOptimization%2FDecision-Optimization-with-OPL-CPO-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IBMDecisionOptimization","download_url":"https://codeload.github.com/IBMDecisionOptimization/Decision-Optimization-with-OPL-CPO-samples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBMDecisionOptimization%2FDecision-Optimization-with-OPL-CPO-samples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29487794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T19:29:10.908Z","status":"ssl_error","status_checked_at":"2026-02-15T19:29:10.419Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-10T00:29:06.254Z","updated_at":"2026-02-15T20:04:25.953Z","avatar_url":"https://github.com/IBMDecisionOptimization.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# IBM® Decision Optimization Modeling with OPL and CP Optimizer on DOcplexcloud\n\nWelcome to IBM® Decision Optimization Modeling with OPL and CP Optimizer on DOcplexcloud.\n\n\nThis library contains various model examples with different file types. For each sample you can find here:\n* **documentation** - a pdf file describing the optimization problem and the model\n* **the model and data files** - a folder containing the .mod, .dat or .ops files\n\n\nYou can solve OPL models with CP Optimizer on DOcplexcloud by\n \n- uploading a MOD file with optional JSON file(s) and/or zero or more DAT file(s) and/or zero or more Excel files.\n- uploading an OPLPROJECT file with a default run configuration, one or more MOD file(s), zero or more DAT file(s), and an optional OPS file.\n\nAn OPL project can have only one default run configuration.\n\nAll files must be in the same root directory; uploads containing multiple directories are not supported. Problem files cannot connect to an external data source. You cannot drag and drop files directly from an archive viewer into the DropSolve interface. All files must be dropped on the DropSolve interface simultaneously.\n\nSolving with the IBM Decision Optimization on Cloud service (DOcplexcloud) requires that you\n[Register for a DropSolve account](https://dropsolve-oaas.docloud.ibmcloud.com/software/analytics/docloud). You can register for the DOcplexcloud free trial and use it free for 30 days.\n\n## Model descriptions\n\n### House building\nHow can you schedule a series of tasks of varying durations where some tasks must finish before others start? And assign workers to each of the tasks such that each worker is assigned to only one task at any given time? And maximize the matching of worker skills to the tasks?\n\nTo illustrate scheduling of tasks in an optimal way, consider a house building problem in which five houses must be completed by a given date. The construction of each house includes a number of tasks such as installing a roof and painting. Each of these tasks requires a given duration of time from the start to completion of the task. Some tasks must necessarily take place before others; for example, the roofing must be complete before the windows can be installed. Moreover, there are three workers, and each task requires one of the three workers. The three workers have varying levels of skills with regard to the various tasks; if a worker has no skill for a particular task, he cannot be assigned to the task. For some pairs of tasks, if a particular worker performs one of the pair on a house, then the same worker must be assigned to the other of the pair for that house. The objective is to find a solution that maximizes the task-associated skill levels of the workers assigned to the tasks.\n\nThis is an example of a scheduling problem in which tasks are represented using a special variable called an interval variable. An interval has a start time, an end time, and a duration. There are special constraints for intervals, including precedence constraints and no overlap constraints, which are used to model this problem.\n\n### Sports scheduling\nHow can a sports league schedule matches between teams in different divisions such that the teams play each other the appropriate number of times and maximize the objective of scheduling intradivision matches as late as possible in the season?\n\nA sports league with two divisions needs to schedule games such that each team plays every team within its division a given number of times and plays every team in the other division a given number of times. Each week, a team plays exactly one game. The preference is for intradivisional matches to be held as late as possible in the season. To model this preference, there is an incentive for intradivisional matches; this incentive increases exponentially by week. The problem consists of assigning an opponent to each team each week in order to maximize the total of the incentives.\n\nThis type of discrete optimization problem can be solved using Integer Programming (IP) or Constraint Programming (CP). Integer Programming is the class of problems defined as the optimization of a linear function, subject to linear constraints over integer variables. Constraint Programming problems generally have discrete decision variables, but the constraints can be logical and the arithmetic expressions are not restricted to being linear.\n\nFor comparison purposes this sample is also provided in a format for CPLEX solution.\n\n### Steel mill slab design\n\nHow can raw materials be assigned to a batch of orders of different sizes and different processing requirements in order to minimize waste?\n\nA steel mill needs to process a batch of coil orders using steel slabs of varying capacities. Each order has a weight and a color associated with it. The color represents the specific process used to build the coil. A coil order must be built from only one slab. A slab can be used to process multiple coil orders from the batch; however, there can be at most two colors among the set of orders assigned to a given slab.\n\nThere is a finite number of slab capacities, but there is an unlimited number of slabs of each size available. The cumulative sum of the weights of the coil orders assigned to a particular slab is called its load. The load assigned to a slab must not exceed the capacity of the slab.\n\nThe objective of the problem is to minimize the unused capacity (the loss) of the selected slabs.\n\nThis type of discrete optimization problem can be solved using Constraint Programming. Constraint Programming problems generally have discrete decision variables, but the constraints can be logical and the arithmetic expressions are not restricted to being linear.\n\n\n## License\n\nThis library is delivered under the  Apache License Version 2.0, January 2004 (see LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibmdecisionoptimization%2Fdecision-optimization-with-opl-cpo-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibmdecisionoptimization%2Fdecision-optimization-with-opl-cpo-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibmdecisionoptimization%2Fdecision-optimization-with-opl-cpo-samples/lists"}