Install IRIS at the inner-ellipsoid branch:
git clone https://github.com/rdeits/iris-distro
cd iris-distro
git checkout inner-ellipsoid
mkdir build
cd build
cmake .. -DPYTHON_EXECUTABLE=/path/to/python
make
| 1 -359945e-40 0 -179723e-22 -1.01745 -0.187705 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.0861046 551002e-23 -0.771255 -0.391058 -0.0909989 250002e-9 | |
| -359945e-40 1 0 1.01745 -18761e-21 0.128379 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.128379 0.832155 462213e-23 250602e-23 330875e-24 0.09 | |
| 0 -774796e-40 1 0.187705 -0.128379 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 146152e-23 0.0861046 -0.128379 0.0745409 -0.199547 0.0499994 | |
| 1 -359945e-40 0 -183925e-22 -1.01745 -0.0877046 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0138954 508983e-23 -0.771255 -0.391058 -0.0909989 -250002e-9 | |
| -359945e-40 1 0 1.01745 -18761e-21 0.128379 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.128379 0.832155 462213e-23 250602e-23 330875e-24 0.09 | |
| 0 -774796e-40 1 0.0877046 -0.128379 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 104133e-23 -0.0138954 -0.128379 0.0745409 -0.199547 -0.0499994 | |
| 1 -359945e-40 0 -183694e-22 -1.0162 -0.0877046 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0138954 508209e-23 |
| # Derived from https://github.com/docker-library/julia which is distributed | |
| # under the terms of the MIT Expat license and is | |
| # Copyright (c) 2014-2015 Docker, Inc. | |
| FROM ubuntu:trusty-20171117 | |
| # FROM ubuntu:xenial-20171114 | |
| # FROM ubuntu:zesty-20171114 | |
| # FROM ubuntu:artful-20171116 | |
| # FROM debian:jessie |
| # FROM ubuntu:trusty-20171117 | |
| # FROM ubuntu:xenial-20171114 | |
| # FROM ubuntu:zesty-20171114 | |
| FROM ubuntu:artful-20171116 | |
| # FROM debian:jessie | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends \ | |
| ca-certificates \ | |
| curl |
Install IRIS at the inner-ellipsoid branch:
git clone https://github.com/rdeits/iris-distro
cd iris-distro
git checkout inner-ellipsoid
mkdir build
cd build
cmake .. -DPYTHON_EXECUTABLE=/path/to/python
make
| WARNING: An error occurred during inference. Type inference is now partially disabled. | |
| Base.MethodError(f=typeof(Core.Inference.convert)(), args=(Base.AssertionError, "invalid age range update"), world=0x0000000000000ac2) | |
| rec_backtrace at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/stackwalk.c:84 | |
| record_backtrace at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/task.c:245 [inlined] | |
| jl_throw at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/task.c:564 | |
| jl_method_error_bare at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1478 | |
| jl_method_error at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1496 | |
| jl_lookup_generic_ at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1910 | |
| jl_apply_generic at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1930 | |
| Type at ./coreimg.jl:14 |
(for the Julia version of this code, check out the demo.ipynb notebook in https://github.com/rdeits/DrakeVisualizer.jl)
Pre-built binary versions of Director are available from http://people.csail.mit.edu/patmarion/software/director/releases/. All of the features described here are known to work with version 0.1.0-35-g26aa674 but newer versions should work too. Just download the appropriate file for your operating system and extract the files.
| using JuMP | |
| using SCS | |
| using Gurobi | |
| # Objective is min. 1/2 x'Qx + q'x | |
| Q = [1 0.1; 0.1 1] | |
| q = [-3., 4] | |
| ## Solve with SCS | |
| m = Model(solver=SCSSolver()) |
| """ | |
| @wrappedallocs(expr) | |
| Given an expression, this macro wraps that expression inside a new function | |
| which will evaluate that expression and measure the amount of memory allocated | |
| by the expression. Wrapping the expression in a new function allows for more | |
| accurate memory allocation detection when using global variables (e.g. when | |
| at the REPL). | |
| For example, `@wrappedallocs(x + y)` produces: |
(based on work by @tkoolen)
This macro has been improved and moved into a new package: https://github.com/rdeits/AxisArrayVariables.jl
We can define a macro to build up AxisArrays of JuMP variables:
| import forcespro as fp | |
| import numpy as np | |
| NUM_FRICTION_CONE_BASIS_VECTORS = 4 | |
| stages = fp.MultistageProblem(1) | |
| stages.dims[0]['n'] = NUM_FRICTION_CONE_BASIS_VECTORS # dimension of decision variables | |
| stages.dims[0]['r'] = 0 # number of eq constraints | |
| stages.dims[0]['l'] = NUM_FRICTION_CONE_BASIS_VECTORS # number of lower bounds | |
| stages.dims[0]['u'] = 0 # number of upper bounds |