[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-509502-105":59,"doc-detail-509502-en":131,"doc-similar-509502":184},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","a-minizinc-tutorial","A MiniZinc Tutorial","","MiniZinc is introduced as a modeling language for specifying constrained optimization and decision problems over integers and real numbers. The tutorial explains how models differ from solving methods, how annotations guide underlying solvers, and how MiniZinc interfaces with backend solvers via translation to FlatZinc. It covers model structure, parameters, variables, constraints, objective handling, and the decomposition of global constraints, then expands toward more complex modeling topics such as search and effective practices.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/a-minizinc-tutorial/509502/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/a-minizinc-tutorial/509502.png","ImageObject",300,407,{"name":92,"@type":93},"Nguyễn Văn Học","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-28","2026-10-05",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",15,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What is MiniZinc used for?","Question",{"text":113,"@type":114},"MiniZinc is designed for specifying constrained optimization and decision problems over integers and real numbers.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"How does MiniZinc relate to FlatZinc and backend solvers?",{"text":118,"@type":114},"MiniZinc translates an input model into a FlatZinc model, enabling specialized constraint forms for different backend solvers.",{"name":120,"@type":111,"acceptedAnswer":121},"What is the basic structure of a MiniZinc model?",{"text":122,"@type":114},"A model declares parameters and decision variables, adds constraints (and an objective when relevant), and then specifies a solve directive such as satisfy.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},509502,1791348174,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":140,"language":141,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":67,"update_tm":145,"read_time":146,"preview_page_count":44,"preview_urls":147},1374402739827,"https://ap-avatar.wpscdn.com/avatar/14000c97e7351f1a627?x-image-process=image/resize,m_fixed,w_180,h_180&k=1787885694763230660","A MiniZinc Tutorial  \nKim Marriott and Peter J. Stuckey  \nwith contributions from Leslie De Koninck and Horst Samulowitz  \nContents  \n1 Introduction 2  \n2 Basic Modelling in MiniZinc 2  \n2.1 Our First Example ...................................... 2  \n2.2 An Arithmetic Optimisation Example .......................... 5  \n2.3 Data􀀌les and Assertions .................................. 7  \n2.4 Real Number Solving .................................... 10  \n2.5 Basic structure of a model ................................. 12  \n3 More Complex Models 14  \n3.1 Arrays and Sets ....................................... 14  \n3.2 Global Constraints ..................................... 24  \n3.3 Conditional Expressions .................................. 25  \n3.4 Complex Constraints .................................... 27  \n3.5 Set Constraints ........................................ 32  \n3.6 Enumerated Types ..................................... 36  \n4 Predicates 38  \n4.1 Global Constraints ..................................... 38  \n4.1.1 Alldifferent ..................................... 38  \n4.1.2 Cumulative ..................................... 38  \n4.1.3 Table ......................................... 40  \n4.1.4 Regular ........................................ 42  \n4.2 De􀀌ning Predicates ..................................... 43  \n4.3 Re􀀈ection Functions .................................... 46  \n4.4 Local Variables ........................................ 48  \n4.5 Domain Re􀀈ection Functions ............................... 50  \n4.6 Scope ............................................. 51  \n5 Search 51  \n5.1 Finite Domain Search .................................... 53  \n5.2 Search Annotations ..................................... 54  \n5.3 Annotations ......................................... 56  \n6 Effective Modelling Practices in MiniZinc 58  \n6.1 Variable Bounds ....................................... 58  \n6.2 Unconstrained Variables .................................. 60  \n6.3 Effective Generators .................................... 62  \n6.4 Redundant Constraints ................................... 63  \n6.5 Modelling Choices ...................................... 64  \n6.6 Multiple Modelling and Channels ............................ 65  \n7 Boolean Satis􀀌ability Modelling in MiniZinc 67  \n7.1 Modelling Integers ..................................... 68  \n7.2 Modelling Disequality ................................... 68  \n7.3 Modelling Cardinality ................................... 69  \nA MiniZinc Keywords 77  \nB MiniZinc Operators 77  \nC MiniZinc Functions 77  \n1 Introduction  \nMiniZinc is a language designed for specifying constrained optimization and decision problems over integers and real numbers. A MiniZinc model does not dictate how to solve the problem although the model can contain annotations which are used to guide the underlying solver.  \nMiniZinc is designed to interface easily to different backend solvers. It does this by transforming an input MiniZinc model and data 􀀌le into a FlatZinc model. FlatZinc models consist of variable declaration and constraint de􀀌nitions as well as a de􀀌nition of the objective function if the problem is an optimization problem. The translation from MiniZinc to FlatZinc is specializable to individual backend solvers, so they can control what form constraints end up in. In particular, MiniZinc allows the speci􀀌cation of global constraints by decomposition.  \n2 Basic Modelling in MiniZinc  \nIn this section we introduce the basic structure of a MiniZinc model using two simple examples.  \n2.1 Our First Example  \nFigure 1: Australian states.  \nAs our 􀀌rst example, imagine that we wish to colour a map of Australia as shown in Figure 1 . It is made up of seven different states and territories each of which must be given a colour so that adjacent regions have different colours.  \nWe can model this problem very easily in MiniZinc. The model is shown in Figure 2 . The 􀀌rst line in the model is a comment. A comment ","cbCaipgApoFdqZG5","https://ap.wps.com/l/cbCaipgApoFdqZG5","pdf",966449,82,"English","# Contents\n## Introduction\n## Basic Modelling in MiniZinc\n## More Complex Models\n## Predicates\n## Search\n## Effective Modelling Practices in MiniZinc\n## Boolean Satisfiability Modelling in MiniZinc\n## MiniZinc Keywords\n## MiniZinc Operators\n## MiniZinc Functions","[{\"question\":\"What is MiniZinc used for?\",\"answer\":\"MiniZinc is designed for specifying constrained optimization and decision problems over integers and real numbers.\"},{\"question\":\"How does MiniZinc relate to FlatZinc and backend solvers?\",\"answer\":\"MiniZinc translates an input model into a FlatZinc model, enabling specialized constraint forms for different backend solvers.\"},{\"question\":\"What is the basic structure of a MiniZinc model?\",\"answer\":\"A model declares parameters and decision variables, adds constraints (and an objective when relevant), and then specifies a solve directive such as satisfy.\"}]","A MiniZinc Tutorial | PDF",1791236074,207,[148,152,156,160,164,168,172,176,180],{"page_no":8,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/8149d0f4ece8881b891eafdc7b5a2391.webp",983,1390,{"page_no":14,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/caad59c8ac4f7d62e7279aa8c26d0225.webp",982,1389,{"page_no":81,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/79bc0ef16af6a206e49f6dd95a3dabf4.webp",981,1387,{"page_no":19,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/fa565fb849164e1b82754eddd7640200.webp",980,1386,{"page_no":24,"url":165,"width":166,"height":167},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/3bb1723e7dd3d23f757760f84edf8075.webp",979,1385,{"page_no":29,"url":169,"width":170,"height":171},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/a48ed6df97ce42b24e9faa40bb8c9faf.webp",978,1383,{"page_no":34,"url":173,"width":174,"height":175},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/fe94b3b36ed2285ab09656ccf2868a02.webp",977,1382,{"page_no":39,"url":177,"width":178,"height":179},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/14e516c557be76f283f9bb2516c1bb29.webp",976,1380,{"page_no":44,"url":181,"width":182,"height":183},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/efe00098792f07b5b1c48c9bd1c8d159.webp",975,1379,{"list":185,"token":66},[186,192,199,205,211,217,224,230,237,243],{"doc_id":187,"doc_title":188,"file_type":138,"home_preview_img_url":189,"slug":190,"view_count":34,"category_name":30,"create_tm":191},649019,"A Practical Guide to Parametric Drawing in AutoCAD - Learning Objectives","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229972348477/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112479&Signature=myVIOO5vmaTWpxg94d8aNkHGMrg%3D","a-practical-guide-to-parametric-drawing-in-autocad-learning-objectives",1792796648,{"doc_id":193,"doc_title":194,"file_type":138,"home_preview_img_url":195,"slug":196,"view_count":197,"category_name":30,"create_tm":198},118340,"SMLP: Symbolic Machine Learning Prover - User Manual","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229834608346/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112479&Signature=MY7ldoSgJItpunA9ggDqHvC37k8%3D","smlp-symbolic-machine-learning-prover-user-manual",28,1785683168,{"doc_id":200,"doc_title":201,"file_type":138,"home_preview_img_url":202,"slug":203,"view_count":34,"category_name":30,"create_tm":204},677631,"Creo - Sheet Metal Design","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229994033021/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112479&Signature=7DsedMy29hOjhY2LkV%2FFc6S2Czw%3D","creo-sheet-metal-design",1793779497,{"doc_id":206,"doc_title":207,"file_type":138,"home_preview_img_url":208,"slug":209,"view_count":29,"category_name":30,"create_tm":210},504954,"Constraint Programming - Practical Introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229931970017/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112479&Signature=DMRbTYd1BE6ZdhaKZ4k9FNc5fzI%3D","constraint-programming-practical-introduction",1791080803,{"doc_id":212,"doc_title":213,"file_type":138,"home_preview_img_url":214,"slug":215,"view_count":39,"category_name":30,"create_tm":216},655686,"Component Diagrams","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975287783/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112479&Signature=l4VWJr1IYBEGhXLbT9C5KK5mtKE%3D","component-diagrams",1792963286,{"doc_id":218,"doc_title":219,"file_type":138,"home_preview_img_url":220,"slug":221,"view_count":222,"category_name":30,"create_tm":223},655664,"OMG Systems Modeling Language (OMG SysML™) - Tutorial - 25 June 2007","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975286838/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112479&Signature=BXw2ePna%2BLRuZ9zaPr%2BqrqrYKTM%3D","omg-systems-modeling-language-omg-sysml-tutorial-25-june-2007",13,1792963074,{"doc_id":225,"doc_title":226,"file_type":138,"home_preview_img_url":227,"slug":228,"view_count":81,"category_name":30,"create_tm":229},701418,"OWASP Mobile Application Security Verification Standard - Version v1.5.0 - Requirements Overview","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012304973/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112479&Signature=yPryJsL9TMaPoud5IwVhw9fc2Kw%3D","owasp-mobile-application-security-verification-standard-version-v150-requirements-overview",1794528619,{"doc_id":231,"doc_title":232,"file_type":138,"home_preview_img_url":233,"slug":234,"view_count":235,"category_name":30,"create_tm":236},656049,"LINDDUN PRO privacy threat modeling tutorial - Version 0.1 - April 2023","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975298428/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112479&Signature=rbUKXCRUXrkg4K27SF1CYh6Litw%3D","linddun-pro-privacy-threat-modeling-tutorial-version-01-april-2023",12,1792965910,{"doc_id":238,"doc_title":239,"file_type":138,"home_preview_img_url":240,"slug":241,"view_count":24,"category_name":30,"create_tm":242},648792,"RebarCAD - Tutorial - Contents","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229972343144/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112479&Signature=B8RcSDKWxQMm9Wroj7ZOqtC0x4k%3D","rebarcad-tutorial-contents",1792795334,{"doc_id":244,"doc_title":245,"file_type":138,"home_preview_img_url":246,"slug":247,"view_count":14,"category_name":30,"create_tm":248},694052,"Basic 2D Design - Mastercam® X6 Basic 2D Design - December 2011","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230007421116/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112479&Signature=BjCdyj25Hku5%2BdgdkvexlHLkDFs%3D","basic-2d-design-mastercam-x6-basic-2d-design-december-2011",1794343325]