Instantly share code, notes, and snippets.

🎲

# Abel Soares Siqueira abelsiqueira

🎲
Created February 11, 2015 19:17
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
 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
Created June 19, 2015 16:32
Testing Interface with MathProgBase
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 CUTEst using Ipopt using CUTEst.MathProgBaseInterface if length(ARGS) != 1 error("Usage: julia test.jl PROBLEM") end nlp = CUTEstModel(ascii(ARGS[1]))
Created June 24, 2015 19:00

# 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

Created August 9, 2015 22:18
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
 "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
Created November 4, 2015 18:50
Minimum example
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
 include("src/CUTEst.jl") using CUTEst io_err = Cint[0] n = Cint[2] #goth = Cint[0] #libname = "libLOGHAIRY" function bar!(Hv, x, v)
Created November 4, 2015 19:24
Using ccall
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
 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}),
Created November 5, 2015 18:57
Examples showing that @eval is bad
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
 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]
Created November 5, 2015 19:24
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
 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}
Created October 17, 2016 20:34
Equality CUTEst problems with no bounds on variables
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
 DIXMAANI LIARWHD SCHMVETT VAREIGVL MSS1 AUG2D HS79 LUKVLE8 DIXMAANJ SBRYBND
Created November 9, 2016 21:30
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
 HILBERTA HIMMELBB SISSER SINEVAL HAIRY MARATOSB HIMMELBG DENSCHNF HIMMELBH ZANGWIL2