`myopenopt` is a package for myopenopt.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
myopenopt-0.0.3.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for myopenopt-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 084d8d212f84e3bbf519cf22e1099d168e41c31eec4782bca032239ea580b668 |
|
MD5 | 962573c1ec2ce559d6340e0037dabe6f |
|
BLAKE2b-256 | 3ffd737a4fc92fc51ebd323cc0dcfab7e17f327d8eb13a4f95142f6d9f8e6486 |