Skip to content

Instantly share code, notes, and snippets.

Avatar
🎲

Abel Soares Siqueira abelsiqueira

🎲
View GitHub Profile
View output
Problem name: BYRDSPHR
Double precision version will be formed
The objective function uses 1 linear group
There are 2 nonlinear equality constraints
There are 3 free variables
@abelsiqueira
abelsiqueira / test.jl
Created Jun 19, 2015
Testing Interface with MathProgBase
View test.jl
using CUTEst
using Ipopt
using CUTEst.MathProgBaseInterface
if length(ARGS) != 1
error("Usage: julia test.jl PROBLEM")
end
nlp = CUTEstModel(ascii(ARGS[1]))
View README.md

Instruções

Faça as rodadas dos times, com forças em cada e fora de cada descritas na tabela de esntrada, e crie a tabela de pontos do primeiro e do segundo turno, separadamente. Depois crie o somatório dos pontos, e ordene a saída.

Como rodar

Para rodar no terminal, implemente o seu programa de modo a receber test1.in como entrada, e jogue a saída para test1.out

$ python meu_codigo.py < test1.in > test1.out

View doc.jl
"1st foo: x::Int->x+1"
function foo(x::Int)
return x+1
end
"2nd foo: x::Float64->x/2"
function foo(x::Float64)
return x/2
end
View gist:0e1eb32592d11ab63164
include("src/CUTEst.jl")
using CUTEst
io_err = Cint[0]
n = Cint[2]
#goth = Cint[0]
#libname = "libLOGHAIRY"
function bar!(Hv, x, v)
View mwe2
include("src/CUTEst.jl")
using CUTEst
io_err = Cint[0]
function foo!(nlp, goth, x, v)
result = Array(Cdouble, nlp.meta.nvar)
@eval ccall(("cutest_uhprod_", $(nlp.libname)), Void,
(Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}),
@abelsiqueira
abelsiqueira / mwe_nlp_noeval.jl
Created Nov 5, 2015
Examples showing that @eval is bad
View mwe_nlp_noeval.jl
include("src/CUTEst.jl")
using CUTEst
function test(nlp; N = 100)
n = Cint[nlp.meta.nvar]
m = Cint[nlp.meta.ncon]
x = zeros(nlp.meta.nvar)
c = zeros(nlp.meta.ncon)
io_err = Cint[0]
View mwe_indirect_call.jl
include("src/CUTEst.jl")
using CUTEst
macro dlsym(func, lib)
z, zlocal = gensym(string(func)), gensym()
eval(current_module(), :(global $z = C_NULL))
z = esc(z)
quote
let $zlocal::Ptr{Void} = $z::Ptr{Void}
@abelsiqueira
abelsiqueira / All
Created Oct 17, 2016
Equality CUTEst problems with no bounds on variables
View All
DIXMAANI
LIARWHD
SCHMVETT
VAREIGVL
MSS1
AUG2D
HS79
LUKVLE8
DIXMAANJ
SBRYBND
View unc-problems.txt
HILBERTA
HIMMELBB
SISSER
SINEVAL
HAIRY
MARATOSB
HIMMELBG
DENSCHNF
HIMMELBH
ZANGWIL2