This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(v0.7) pkg> test RandomCorrelationMatrices | |
Testing RandomCorrelationMatrices | |
Resolving package versions... | |
Random correlation matrix | |
ERROR: LoadError: MethodError: no method matching cholesky(::Array{Float64,2}, ::Type{Val{:L}}) | |
Closest candidates are: | |
cholesky(::Union{Union{DenseArray{T,2}, Base.ReinterpretArray{T,2,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Tuple{AbstractUnitRange,Vararg{Any,N} where N} where A<:DenseArray where N where T, DenseArray}, Base.ReshapedArray{T,2,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{Base.ReinterpretArray{T,N,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Tuple{AbstractUnitRange,Vararg{Any,N} where N} where A<:DenseArray where N where T, DenseArray} where N where T, SubArray{T,N,A,I,true} where I<:Tuple{AbstractUnitRange,Vararg{Any,N} where N} where A<:DenseArray where N where T, DenseArray}, SubArray{T,2,A,I,L} where L where I<:Tuple{Vararg{Union{Int64, AbstractR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using JuMP, Ipopt | |
function run_test() | |
# Create JuMP model, using Ipopt as the solver | |
mod = Model(solver=IpoptSolver(print_level=0)) | |
# Constants | |
# Note that all parameters in the model have been normalized | |
# to be dimensionless. See the COPS3 paper for more info. | |
h_0 = 1 # Initial height |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using JuMP, Ipopt | |
function run_test() | |
# Create JuMP model, using Ipopt as the solver | |
mod = Model(solver=IpoptSolver(print_level=0)) | |
# Constants | |
# Note that all parameters in the model have been normalized | |
# to be dimensionless. See the COPS3 paper for more info. | |
h_0 = 1 # Initial height |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JuMP 0.11 | |
Julia 0.4.1 | |
5.173100 seconds (8.65 M allocations: 387.304 MB, 1.78% gc time) | |
1.112170 seconds (2.30 M allocations: 103.153 MB, 3.06% gc time) | |
1.112430 seconds (2.30 M allocations: 103.343 MB, 2.77% gc time) | |
Julia 0.5-dev+2072 (17287f0) | |
5.294610 seconds (8.65 M allocations: 387.346 MB, 1.70% gc time) | |
1.164331 seconds (2.30 M allocations: 103.153 MB, 3.15% gc time) | |
1.104843 seconds (2.30 M allocations: 103.343 MB, 2.81% gc time) | |
Julia 0.5-llvm37 branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for col in 1:n | |
for idx in colptr[i]:colptr[i]-1 | |
row = rowval[idx] | |
nzv = nzvals[idx] | |
if row==col && nzv | |
return true | |
elseif row>col | |
break | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 113, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using JuMP | |
_model = Model() | |
import Base: LineEdit, REPL | |
function handle_line(line) | |
if line[1:3] == "Var" | |
Base.parse_input_line("@defVar(_model,$(line[5:end]))") | |
elseif line[1:3] == "Max" || line[1:3] == "Min" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AffineTransforms.tformscale | |
AffineTransforms.tformtranslate | |
AffineTransforms.tformfwd3rd | |
AffineTransforms.tformrigid | |
AffineTransforms.rotationmatrix | |
AffineTransforms.tformrotate | |
AffineTransforms.tforminv! | |
AffineTransforms.rotation3 | |
AffineTransforms.rotationparameters | |
AffineTransforms.AffineTransforms |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param max_u_rho := 1; | |
param max_u_the := 1; | |
param max_u_phi := 1; | |
param L := 5; | |
let tf := 1.0; | |
let {k in 0..nh} rho[k] := 4.5; | |
let {k in 0..nh} the[k] := (2*pi/3)*(k/nh)^2; |
NewerOlder