[{"data":1,"prerenderedAt":291},["ShallowReactive",2],{"dev-\u002Fdeveloper\u002Fdata-format":3},{"id":4,"title":5,"body":6,"description":283,"extension":284,"meta":285,"navigation":286,"path":287,"seo":288,"stem":289,"__hash__":290},"content\u002Fdeveloper\u002Fdata-format.md","Modeling front-ends",{"type":7,"value":8,"toc":278},"minimark",[9,13,35,77,84,89,184,188,222,238,242,269,274],[10,11,5],"h1",{"id":12},"modeling-front-ends",[14,15,16,17,21,22,25,26,30,31,34],"p",{},"There is no Quicopt-specific modeling language to learn. You author your model\nin a standard Python front-end — ",[18,19,20],"strong",{},"Pyomo"," or ",[18,23,24],{},"OR-Tools MathOpt"," — and pass\nit to ",[27,28,29],"code",{},"client.solve()"," (or ",[27,32,33],{},"client.submit()",") directly; the client handles the\nconversion internally:",[36,37,42],"pre",{"className":38,"code":39,"language":40,"meta":41,"style":41},"language-bash shiki shiki-themes github-dark","pip install \"quicopt[pyomo]\"      # model in Pyomo\npip install \"quicopt[mathopt]\"    # model in OR-Tools MathOpt\n","bash","",[27,43,44,64],{"__ignoreMap":41},[45,46,49,53,57,60],"span",{"class":47,"line":48},"line",1,[45,50,52],{"class":51},"svObZ","pip",[45,54,56],{"class":55},"sU2Wk"," install",[45,58,59],{"class":55}," \"quicopt[pyomo]\"",[45,61,63],{"class":62},"sAwPA","      # model in Pyomo\n",[45,65,67,69,71,74],{"class":47,"line":66},2,[45,68,52],{"class":51},[45,70,56],{"class":55},[45,72,73],{"class":55}," \"quicopt[mathopt]\"",[45,75,76],{"class":62},"    # model in OR-Tools MathOpt\n",[14,78,79,80,83],{},"Both extras can be installed side by side; ",[27,81,82],{},"solve()"," dispatches on the model\ntype you pass in.",[85,86,88],"h2",{"id":87},"what-each-front-end-can-express","What each front-end can express",[90,91,92,105],"table",{},[93,94,95],"thead",{},[96,97,98,101,103],"tr",{},[99,100],"th",{},[99,102,20],{},[99,104,24],{},[106,107,108,127,155,165],"tbody",{},[96,109,110,114,124],{},[111,112,113],"td",{},"Objectives",[111,115,116,117,120,121],{},"linear, quadratic, and general non-linear — ",[27,118,119],{},"+ - * \u002F ^"," and ",[27,122,123],{},"sin cos exp log sqrt abs",[111,125,126],{},"linear and quadratic",[96,128,129,132,145],{},[111,130,131],{},"Constraints",[111,133,134,137,138,137,141,144],{},[27,135,136],{},"=="," \u002F ",[27,139,140],{},"\u003C=",[27,142,143],{},">="," \u002F ranged, including non-linear expressions",[111,146,147,148,137,150,137,152,154],{},"linear: ",[27,149,136],{},[27,151,140],{},[27,153,143],{}," \u002F ranged and one-sided",[96,156,157,160,163],{},[111,158,159],{},"Variables",[111,161,162],{},"bounds (incl. unbounded), continuous \u002F integer \u002F binary",[111,164,162],{},[96,166,167,170,178],{},[111,168,169],{},"Sense",[111,171,172,137,175],{},[27,173,174],{},"minimize",[27,176,177],{},"maximize",[111,179,180,137,182],{},[27,181,174],{},[27,183,177],{},[85,185,187],{"id":186},"which-one-to-pick","Which one to pick",[189,190,191,205],"ul",{},[192,193,194,196,197,200,201,204],"li",{},[18,195,24],{}," for LP, QP, MILP, and QUBO models. Your variable names\nsurvive into ",[27,198,199],{},"result.solution",", and the vectorised quadratic form\n(",[27,202,203],{},"x @ Q @ x"," with numpy) is a natural fit for QUBOs.",[192,206,207,209,210,213,214,217,218,221],{},[18,208,20],{}," when the model is genuinely non-linear — ",[27,211,212],{},"exp",", ",[27,215,216],{},"log",",\ntrigonometry, powers beyond quadratic — including MINLP (binary decisions\nmixed into a non-linear model) and higher-order binary polynomials\n(PUBO\u002FHUBO). Note that the Pyomo front-end currently returns generic\n",[27,219,220],{},"x1, x2, …"," solution keys.",[14,223,224,225,232,233,237],{},"Whatever the front-end, the same ",[226,227,229],"a",{"href":228},"\u002Fdeveloper\u002Fapi#the-result-object",[27,230,231],{},"Result","\ncomes back, and the ",[226,234,236],{"href":235},"\u002Fdeveloper\u002Fapi#status-semantics","status semantics"," are\nidentical.",[85,239,241],{"id":240},"problem-classes","Problem classes",[14,243,244,245,248,249,253,254,257,258,264,265,268],{},"Today the service solves ",[18,246,247],{},"LP, QP, MILP, MINLP, QUBO, PUBO\u002FHUBO, and NLP"," —\nsee the ",[226,250,252],{"href":251},"\u002Fdeveloper\u002Fexamples","runnable example for each class",". One free-tier\nedge: in a non-linear model, integer variables beyond binary on\u002Foff decisions\naren't accepted yet. ",[18,255,256],{},"Black-box objectives are coming soon","; a model outside\ntoday's classes is declined with a readable message (a\n",[226,259,261],{"href":260},"\u002Fdeveloper\u002Fapi#errors-quicopterror",[27,262,263],{},"QuicoptError"," with\n",[27,266,267],{},"reason: \"unsupported_model\"","), never a wrong result.",[270,271],"contact-cta",{"sub":272,"title":273},"Tell us what you're optimizing — we'll let you know as soon as your problem class ships.","Need a class that isn't live yet?",[275,276,277],"style",{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":41,"searchDepth":66,"depth":66,"links":279},[280,281,282],{"id":87,"depth":66,"text":88},{"id":186,"depth":66,"text":187},{"id":240,"depth":66,"text":241},"What you can express in the two supported modeling front-ends — Pyomo and OR-Tools MathOpt — and which one to pick.","md",{},true,"\u002Fdeveloper\u002Fdata-format",{"title":5,"description":283},"developer\u002Fdata-format","Hn9FnPGS4aunbl2n5Q5nUNY8kz2_ECsXYjyvDTXxl-I",1783518720546]