Skip to content

Commit 12855c8

Browse files
authored
Merge pull request #10 from oxfordcontrol/v0.9.0-savvy
v0.9.0
2 parents ba4e3fe + 825da6c commit 12855c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2327
-628
lines changed

.Rbuildignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
^src/rust/vendor.sh
1111
^src/rust/fix_hash.R
1212
^src/rust/Cargo.lock
13+
^src/rust/vendor$
1314
^src/*.o
1415
^src/*.so
1516
^update_authors.R$
17+
18+
^src/rust/.cargo$
19+
^src/Makevars$

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,6 @@ vignettes/*.pdf
4343

4444
# My stuff
4545
inst/stuff
46+
47+
# Makevars is generated
48+
src/Makevars

DESCRIPTION

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: clarabel
22
Type: Package
33
Title: Interior Point Conic Optimization Solver
4-
Version: 0.5.1
4+
Version: 0.9.0
55
Authors@R: c(person("Balasubramanian", "Narasimhan", role=c("aut", "cre"),
66
email = "naras@stanford.edu"),
77
person("Paul", "Goulart", role=c("aut", "cph")),
@@ -10,13 +10,12 @@ Authors@R: c(person("Balasubramanian", "Narasimhan", role=c("aut", "cre"),
1010
comment = "For vendoring/Makefile hints/R scripts for generating crate authors/licenses"),
1111
person(given = "The authors of the dependency Rust crates", role = c("ctb"),
1212
comment = "see inst/AUTHORS file for details"))
13-
Description: A versatile interior point solver that solves linear programs (LPs), quadratic programs (QPs), second-order cone programs (SOCPs), semidefinite programs (SDPs), and problems with exponential and power cone constraints (<https://oxfordcontrol.github.io/ClarabelDocs/stable/>). For quadratic objectives, unlike interior point solvers based on the standard homogeneous self-dual embedding (HSDE) model, 'Clarabel' handles quadratic objective without requiring any epigraphical reformulation of its objective function. It can therefore be significantly faster than other HSDE-based solvers for problems with quadratic objective functions. Infeasible problems are detected using using a homogeneous embedding technique.
13+
Description: A versatile interior point solver that solves linear programs (LPs), quadratic programs (QPs), second-order cone programs (SOCPs), semidefinite programs (SDPs), and problems with exponential and power cone constraints (<https://clarabel.org/stable/>). For quadratic objectives, unlike interior point solvers based on the standard homogeneous self-dual embedding (HSDE) model, 'Clarabel' handles quadratic objective without requiring any epigraphical reformulation of its objective function. It can therefore be significantly faster than other HSDE-based solvers for problems with quadratic objective functions. Infeasible problems are detected using using a homogeneous embedding technique.
1414
License: Apache License (== 2.0)
15-
SystemRequirements: Cargo (rustc package manager) and GNU make
1615
Encoding: UTF-8
1716
Roxygen: list(markdown = TRUE)
1817
Config/rextendr/version: 0.3.1
19-
RoxygenNote: 7.2.3
18+
RoxygenNote: 7.3.1
2019
URL: https://oxfordcontrol.github.io/clarabel-r/
2120
BugReports: https://github.com/oxfordcontrol/clarabel-r/issues
2221
Suggests:
@@ -25,3 +24,6 @@ Suggests:
2524
rmarkdown,
2625
tinytest
2726
VignetteBuilder: knitr
27+
SystemRequirements: Cargo (Rust package manager), rustc and GNU Make
28+
Imports:
29+
methods

LICENSE.note

Lines changed: 114 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
This package contains the Rust source code of the dependencies in src/rust/vendor.tar.xz
22
The authorships and the licenses are listed below. In summary, all libraries are
33
distributed either under the MIT license or under MIT/Apache-2.0 dual license [1].
4-
54
Note that, when Cargo (Rust’s build system and package manager) is not installed
65
on the machine, the pre-compiled binary will be downloaded on building this
76
package. The binary is compiled using the same Rust code, so the authorships and
87
the licenses are the same as listed here.
9-
108
[1]: The unicode-indent library shows 'Unicode-DFS-2016' license because it
119
contains some test data generated by using the Unicode Character Database.
1210
So, this license is not applied to the actual sources that get compiled.
1311
Please refer to the License section of the library's README
1412
(https://crates.io/crates/unicode-ident) for the details.
15-
1613
===============================
17-
1814
Name: aho-corasick
1915
Files: vendor/aho-corasick/*
2016
Authors: Andrew Gallant
@@ -38,7 +34,7 @@ License: Apache-2.0 OR MIT
3834

3935
Name: blas-src
4036
Files: vendor/blas-src/*
41-
Authors: Balasubramanian Narasimhan, Ivan Ukhov, Jed Brown, Stefan Kroboth, Toshiki Teramura, bluss
37+
Authors: Balasubramanian Narasimhan, Ivan Ukhov, Jed Brown, Michael Zietz, Stefan Kroboth, Toshiki Teramura, bluss
4238
License: Apache-2.0/MIT
4339

4440
------------------------------
@@ -57,6 +53,13 @@ License: Apache-2.0/MIT
5753

5854
------------------------------
5955

56+
Name: cc
57+
Files: vendor/cc/*
58+
Authors: Alex Crichton
59+
License: MIT OR Apache-2.0
60+
61+
------------------------------
62+
6063
Name: cfg-if
6164
Files: vendor/cfg-if/*
6265
Authors: Alex Crichton
@@ -113,31 +116,24 @@ License: MIT/Apache-2.0
113116

114117
------------------------------
115118

116-
Name: enum_dispatch
117-
Files: vendor/enum_dispatch/*
118-
Authors: Anton Lazarev
119+
Name: either
120+
Files: vendor/either/*
121+
Authors: bluss
119122
License: MIT OR Apache-2.0
120123

121124
------------------------------
122125

123-
Name: extendr-api
124-
Files: vendor/extendr-api/*
125-
Authors: andy-thomason, Thomas Down, Mossa Merhi Reimert, Claus O. Wilke, Hiroaki Yutani, Ilia A. Kosenkov, Michael Milton
126-
License: MIT
127-
128-
------------------------------
129-
130-
Name: extendr-engine
131-
Files: vendor/extendr-engine/*
132-
Authors: andy-thomason, Thomas Down, Mossa Merhi Reimert, Claus O. Wilke, Hiroaki Yutani, Ilia A. Kosenkov
133-
License: MIT
126+
Name: enum_dispatch
127+
Files: vendor/enum_dispatch/*
128+
Authors: Anton Lazarev
129+
License: MIT OR Apache-2.0
134130

135131
------------------------------
136132

137-
Name: extendr-macros
138-
Files: vendor/extendr-macros/*
139-
Authors: andy-thomason, Thomas Down, Mossa Merhi Reimert, Claus O. Wilke, Hiroaki Yutani, Ilia A. Kosenkov
140-
License: MIT
133+
Name: equivalent
134+
Files: vendor/equivalent/*
135+
Authors:
136+
License: Apache-2.0 OR MIT
141137

142138
------------------------------
143139

@@ -148,16 +144,44 @@ License: Apache-2.0 / MIT
148144

149145
------------------------------
150146

147+
Name: hashbrown
148+
Files: vendor/hashbrown/*
149+
Authors: Amanieu d'Antras
150+
License: MIT OR Apache-2.0
151+
152+
------------------------------
153+
151154
Name: ident_case
152155
Files: vendor/ident_case/*
153156
Authors: Ted Driggs
154157
License: MIT/Apache-2.0
155158

156159
------------------------------
157160

161+
Name: indexmap
162+
Files: vendor/indexmap/*
163+
Authors:
164+
License: Apache-2.0 OR MIT
165+
166+
------------------------------
167+
168+
Name: itertools
169+
Files: vendor/itertools/*
170+
Authors: bluss
171+
License: MIT OR Apache-2.0
172+
173+
------------------------------
174+
175+
Name: itoa
176+
Files: vendor/itoa/*
177+
Authors: David Tolnay
178+
License: MIT OR Apache-2.0
179+
180+
------------------------------
181+
158182
Name: lapack-src
159183
Files: vendor/lapack-src/*
160-
Authors: Balasubramanian Narasimhan, Ivan Ukhov, Mitsutoshi Aoe, Stefan Kroboth, Toshiki Teramura
184+
Authors: Balasubramanian Narasimhan, Ivan Ukhov, Michael Zietz, Mitsutoshi Aoe, Stefan Kroboth, Toshiki Teramura
161185
License: Apache-2.0/MIT
162186

163187
------------------------------
@@ -190,17 +214,10 @@ License: MIT OR Apache-2.0
190214

191215
------------------------------
192216

193-
Name: libR-sys
194-
Files: vendor/libR-sys/*
195-
Authors: andy-thomason, Thomas Down, Mossa Merhi Reimert, Claus O. Wilke, Ilia A. Kosenkov, Hiroaki Yutani
196-
License: MIT
197-
198-
------------------------------
199-
200217
Name: memchr
201218
Files: vendor/memchr/*
202219
Authors: Andrew Gallant, bluss
203-
License: Unlicense/MIT
220+
License: Unlicense OR MIT
204221

205222
------------------------------
206223

@@ -225,13 +242,6 @@ License: MIT OR Apache-2.0
225242

226243
------------------------------
227244

228-
Name: paste
229-
Files: vendor/paste/*
230-
Authors: David Tolnay
231-
License: MIT OR Apache-2.0
232-
233-
------------------------------
234-
235245
Name: proc-macro2
236246
Files: vendor/proc-macro2/*
237247
Authors: David Tolnay, Alex Crichton
@@ -253,16 +263,79 @@ License: MIT
253263

254264
------------------------------
255265

266+
Name: regex-automata
267+
Files: vendor/regex-automata/*
268+
Authors: The Rust Project Developers, Andrew Gallant
269+
License: MIT OR Apache-2.0
270+
271+
------------------------------
272+
256273
Name: regex-syntax
257274
Files: vendor/regex-syntax/*
258-
Authors: The Rust Project Developers
275+
Authors: The Rust Project Developers, Andrew Gallant
259276
License: MIT OR Apache-2.0
260277

261278
------------------------------
262279

263280
Name: regex
264281
Files: vendor/regex/*
265-
Authors: The Rust Project Developers
282+
Authors: The Rust Project Developers, Andrew Gallant
283+
License: MIT OR Apache-2.0
284+
285+
------------------------------
286+
287+
Name: ryu
288+
Files: vendor/ryu/*
289+
Authors: David Tolnay
290+
License: Apache-2.0 OR BSL-1.0
291+
292+
------------------------------
293+
294+
Name: savvy-bindgen
295+
Files: vendor/savvy-bindgen/*
296+
Authors: Hiroaki Yutani
297+
License: MIT
298+
299+
------------------------------
300+
301+
Name: savvy-ffi
302+
Files: vendor/savvy-ffi/*
303+
Authors: Hiroaki Yutani
304+
License: MIT
305+
306+
------------------------------
307+
308+
Name: savvy-macro
309+
Files: vendor/savvy-macro/*
310+
Authors: Hiroaki Yutani
311+
License: MIT
312+
313+
------------------------------
314+
315+
Name: savvy
316+
Files: vendor/savvy/*
317+
Authors: Hiroaki Yutani
318+
License: MIT
319+
320+
------------------------------
321+
322+
Name: serde_derive
323+
Files: vendor/serde_derive/*
324+
Authors: Erick Tryzelaar, David Tolnay
325+
License: MIT OR Apache-2.0
326+
327+
------------------------------
328+
329+
Name: serde_json
330+
Files: vendor/serde_json/*
331+
Authors: Erick Tryzelaar, David Tolnay
332+
License: MIT OR Apache-2.0
333+
334+
------------------------------
335+
336+
Name: serde
337+
Files: vendor/serde/*
338+
Authors: Erick Tryzelaar, David Tolnay
266339
License: MIT OR Apache-2.0
267340

268341
------------------------------

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
export(clarabel)
44
export(clarabel_control)
55
export(solver_status_descriptions)
6+
importFrom(methods,as)
67
useDynLib(clarabel)
78
useDynLib(clarabel, .registration = TRUE)

NEWS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# clarabel 0.9.0
2+
3+
- Synced up to version 0.9.0 of Clarabel.rs
4+
- Added all applicable tests from Clarabel.rs
5+
- Updated documentation of cone specification
6+
- Updated vignette
7+
- Switched to savvy from rextendr
8+
19
# clarabel 0.5.1
210

311
- Clarabel now supports semidefinite programs (syncing up to version 0.5.1 of Clarabel.rs)

R/000-wrappers.R

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Generated by savvy: do not edit by hand
2+
#
3+
# Note:
4+
# This wrapper file is named as `000-wrappers.R` so that this file is loaded
5+
# first, which allows users to override the functions defined here (e.g., a
6+
# print() method for an enum).
7+
8+
#' @useDynLib clarabel, .registration = TRUE
9+
#' @keywords internal
10+
NULL
11+
12+
# Check class and extract the external pointer embedded in the environment
13+
.savvy_extract_ptr <- function(e, class) {
14+
if(is.null(e)) {
15+
return(NULL)
16+
}
17+
18+
if(inherits(e, class)) {
19+
e$.ptr
20+
} else {
21+
msg <- paste0("Expected ", class, ", got ", class(e)[1])
22+
stop(msg, call. = FALSE)
23+
}
24+
}
25+
26+
27+
clarabel_solve <- function(m, n, Ai, Ap, Ax, b, q, Pi, Pp, Px, cone_spec, r_settings) {
28+
.Call(savvy_clarabel_solve__impl, m, n, Ai, Ap, Ax, b, q, Pi, Pp, Px, cone_spec, r_settings)
29+
}
30+
31+

R/clarabel-package.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#' Interface to Clarabel solver implemented in Rust.
22
#'
3-
#' @description Clarabel is a versatile interior point solver for convex programs using a new homogeneous embedding. It solves solves linear programs (LPs), quadratic programs (QPs), second-order cone programs (SOCPs), and problems with exponential and power cone constraints. For quadratic objectives, unlike interior point solvers based on the standard homogeneous self-dual embedding (HSDE) model, Clarabel handles quadratic objective without requiring any epigraphical reformulation of its objective function. It can therefore be significantly faster than other HSDE-based solvers for problems with quadratic objective functions. Infeasible problems are detected using a homogeneous embedding technique. See <https://oxfordcontrol.github.io/ClarabelDocs/stable/>.
3+
#' @description Clarabel is a versatile interior point solver for convex programs using a new homogeneous embedding. It solves solves linear programs (LPs), quadratic programs (QPs), second-order cone programs (SOCPs), and problems with exponential and power cone constraints. For quadratic objectives, unlike interior point solvers based on the standard homogeneous self-dual embedding (HSDE) model, Clarabel handles quadratic objective without requiring any epigraphical reformulation of its objective function. It can therefore be significantly faster than other HSDE-based solvers for problems with quadratic objective functions. Infeasible problems are detected using a homogeneous embedding technique. See <https://clarabel.org/stable/>.
44
#'
55
#' @name clarabel-package
66
#' @useDynLib clarabel
7-
#' @docType package
87
#' @author Balasubramanian Narasimhan, Paul Goulart, Yuwen Chen
9-
#' @keywords package
10-
NULL
8+
#' @keywords internal
9+
"_PACKAGE"

0 commit comments

Comments
 (0)