Skip to main content

Myopenopt is a wrapper module for openopt. It supports to call openopt using the same functions and classes as in Gurobi, a commercial mixed integer optimization solver. For more details, see the Gurobi HP http://www.gurobi.com/.

from myopenopt import *
model = Model("sample", mtype='NLP')
x1 = model.addVar(vtype="C", name="x1")
x2 = model.addVar(vtype="C", name="x2")
x3 = model.addVar(vtype="C", ub=10, name="x3")
model.update()
c1 = model.addConstr(x1**2 + 2*x2**2 <= x3**2, name="C1")
c2 = model.addConstr(x3 <= 30, name="C2")
c3 = model.addConstr(quicksum([x1, x2, x3]) <= 20, name="C3" )
model.setObjective(15*x1 + 18*x2 + 30*x3, GRB.MAXIMIZE)
print(model)
model.optimize(solver="ralg")
print("Result =", model.Status)
for v in model.getVars():
    print(v.VarName, v.X)

Requirements

  • Python 3.7 and openopt, FuncDesigner

Features

  • nothing

Setup

Add compiler path(ex. C:\Anaconda3\MinGW\bin)
$ pip install openopt
$ pip install FuncDesigner
$ pip install myopenopt

History

0.0.1 (2015-5-4)

  • first release

Metadata

Release files for myopenopt 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for myopenopt 0.0.3
File Size Uploaded
myopenopt-0.0.3.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for myopenopt 0.0.3
File Interpreter ABI Platform
myopenopt-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 6.9 kB

Release files / myopenopt-0.0.3.tar.gz

Download URL myopenopt-0.0.3.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9e9357cb11681a9bd111b8d6d775a9ed66126c383c3a32b287e21ec336406736
BLAKE2b-256 checksum
How to use checksums
55bb31e2e9ac58009878b6fee19d140e54727ddba1ad0af7fd33ee66e8bef679
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.7.7 Darwin/19.0.0

Release files / myopenopt-0.0.3-py3-none-any.whl

Download URL myopenopt-0.0.3-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
084d8d212f84e3bbf519cf22e1099d168e41c31eec4782bca032239ea580b668
BLAKE2b-256 checksum
How to use checksums
3ffd737a4fc92fc51ebd323cc0dcfab7e17f327d8eb13a4f95142f6d9f8e6486
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.7.7 Darwin/19.0.0

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page