Skip to content

pskarin/pyqpgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About
--------------------------------------------------------------------------------
The software in this respository generates python bindings to optimization code
generated through the QPgen Matlab library for convex optimizations.

Installation
--------------------------------------------------------------------------------
Required software:
	Matlab
	QPgen
	Python
	Cython
	GNU make
	gcc 
	
Install Matlab. Version R2016a is the verified version. QPgen v0.0.2 is included
with the package. To learn all about it go to
	http://www.control.lth.se/fileadmin/control/Research/Tools/qpgen/index.html
Install GNU make, gcc, Python, Cython etc through your preferred package manager.

Usage
--------------------------------------------------------------------------------
Look at the files in example/. The .mk file is imported into make. It sets a
variable defining the output library name and the name of the Matlab m-file
which has the QPgen specification. The m-file should be in the same folder as
the .mk.

Execute make as

  make CONFIG=a_path/a_file.mk

The makefile stores the CONFIG variable in a file (.config) which it reads
when CONFIG isn't specified on the command line and hence on subsequent
execution you only need to run 'make' unless you want to change config.

The library is placed in a folder lib/ located with your .mk (i.e. in a_path/lib
in the example above). If you put the files in the pyqpgen root then the output
is stored instead in a folder named {libname}-out where {libname} is replaced
by the name specified in .mk.

To load the library into your Python application you must have it in the Python
system path. One way to do this is to set it up before the import, inside
Python as shown in the example (which assumes the .mk is not in the pyqpgen
root).

  import sys
  sys.path.append('lib')
  from qpexample import QP

This adds the relative path lib/ to the Python search path and imports the class
QP from the library file qpexample.so. QPgen may generate additional binary data
files which are then located in a folder qp_files/qp_data also stored with your
.mk or in {libname}-out. This path and all the data files must exist and be
readable by the application.

Contents
--------------------------------------------------------------------------------
qpgen/
	This folder contains the QPgen software. It is included in the git since
	it is small and QPgen is otherwise distributed as an archive.
pyqpgen/
	The scripts, code, configurations etc that make the bulk of what PyQPgen is.
example/
  An aircraft example project.
README
	This file.

About

Python wrapper for QPgen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published