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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| myopenopt-0.0.3.tar.gz | 3.4 kB | Without provenance | Details for myopenopt-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| myopenopt-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for myopenopt-0.0.3-py3-none-any.whl |
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
|
Security for myopenopt 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.