Skip to content

Commit f95a59d

Browse files
committed
julia: export from google3
1 parent 0cc982d commit f95a59d

File tree

10 files changed

+4294
-6
lines changed

10 files changed

+4294
-6
lines changed

ortools/julia/ORTools.jl/Project.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ version = "1.0.0-DEV"
44

55
[deps]
66
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
7+
ORToolsGenerated = "6b269722-41d3-11ee-be56-0242ac120002"
8+
ProtoBuf = "3349acd9-ac6a-5e09-bcdb-63829b23a429"
9+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
710

811
[compat]
9-
julia = "1.6.7"
12+
julia = "1.10"
1013

1114
[extras]
1215
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module ORTools
2-
3-
# Write your package code here.
2+
# TODO: b/384496822 - Run formatter across entire package
3+
include("moi_wrapper/MOI_wrapper.jl")
44

55
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
libortools = ORTools_jll.libortools
2+
3+
function MathOptNewInterrupter()
4+
return ccall((:MathOptNewInterrupter, libortools),
5+
Ptr{Cvoid},
6+
(Cvoid,),
7+
ptr)
8+
end
9+
10+
function MathOptFreeInterrupter(ptr)
11+
return ccall((:MathOptFreeInterrupter, libortools),
12+
Cvoid,
13+
(Ptr{Cvoid},),
14+
ptr)
15+
end
16+
17+
function MathOptInterrupt(ptr)
18+
return ccall((:MathOptInterrupt, libortools),
19+
Cvoid,
20+
(Ptr{Cvoid},),
21+
ptr)
22+
end
23+
24+
function MathOptIsInterrupted(ptr)
25+
return ccall((:MathOptIsInterrupted, libortools),
26+
Cint,
27+
(Ptr{Cvoid},),
28+
ptr)
29+
end
30+
31+
function MathOptFree(ptr)
32+
return ccall((:MathOptFree, libortools),
33+
Cvoid,
34+
(Ptr{Cvoid},),
35+
ptr)
36+
end
37+
38+
function MathOptSolve(model, model_size, solver_type, interrupter, solve_result, solve_result_size, status_msg)
39+
return ccall((:MathOptSolve, libortools),
40+
Cint,
41+
(Ptr{Cvoid},
42+
Csize_t,
43+
Cint,
44+
Ptr{Cvoid},
45+
Ptr{Ptr{Cvoid}},
46+
Ptr{Csize_t},
47+
Ptr{Ptr{Cchar}}),
48+
model,
49+
model_size,
50+
solver_type,
51+
interrupter,
52+
solve_result,
53+
solve_result_size,
54+
status_msg)
55+
end
56+

0 commit comments

Comments
 (0)