JuliaOpt/JuMP.jl — pull request #168 by IainNZ (2014-04-30 21:13:03+00:00)
Title: First attempt at printing JuMPDict of floats, close #113

```julia
using JuMP

m = Model()

@defVar(m, i <= foo[i=8:12] <= i)
@defVar(m, i+j <= foobar[i=9:11,j=-1:1] <= i+j)
@defVar(m, i*j*k <= ziggystardust[i=1:3,j=1:3,k=1:3] <= i*j*k)
@defVar(m, 1 <= uwotm8[[:Apple,:Banana,:Carrot]] <= 1)

solve(m)

println(getValue(foo))
println(getValue(foobar))
println(getValue(uwotm8))
println(getValue(ziggystardust))
```

```
foo
[ 8] = 8.0
[ 9] = 9.0
[10] = 10.0
[11] = 11.0
[12] = 12.0

foobar
[9,:]
[9,-1] = 8.0
[ 9,0] = 9.0
[ 9,1] = 10.0
[10,:]
[10,-1] = 9.0
[ 10,0] = 10.0
[ 10,1] = 11.0
[11,:]
[11,-1] = 10.0
[ 11,0] = 11.0
[ 11,1] = 12.0

uwotm8
[ Apple] = 1.0
[Banana] = 1.0
[Carrot] = 1.0

ziggystardust
[1,:,:]
[1,1,:]
[1,1,1] = 1.0
[1,1,2] = 2.0
[1,1,3] = 3.0
[1,2,:]
[1,2,1] = 2.0
[1,2,2] = 4.0
[1,2,3] = 6.0
[1,3,:]
[1,3,1] = 3.0
[1,3,2] = 6.0
[1,3,3] = 9.0
[2,:,:]
[2,1,:]
[2,1,1] = 2.0
[2,1,2] = 4.0
[2,1,3] = 6.0
[2,2,:]
[2,2,1] = 4.0
[2,2,2] = 8.0
[2,2,3] = 12.0
[2,3,:]
[2,3,1] = 6.0
[2,3,2] = 12.0
[2,3,3] = 18.0
[3,:,:]
[3,1,:]
[3,1,1] = 3.0
[3,1,2] = 6.0
[3,1,3] = 9.0
[3,2,:]
[3,2,1] = 6.0
[3,2,2] = 12.0
[3,2,3] = 18.0
[3,3,:]
[3,3,1] = 9.0
[3,3,2] = 18.0
[3,3,3] = 27.0
```