Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.9.0 #10

Merged
merged 9 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
^src/rust/vendor.sh
^src/rust/fix_hash.R
^src/rust/Cargo.lock
^src/rust/vendor$
^src/*.o
^src/*.so
^update_authors.R$

^src/rust/.cargo$
^src/Makevars$
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ vignettes/*.pdf

# My stuff
inst/stuff

# Makevars is generated
src/Makevars
10 changes: 6 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: clarabel
Type: Package
Title: Interior Point Conic Optimization Solver
Version: 0.5.1
Version: 0.9.0
Authors@R: c(person("Balasubramanian", "Narasimhan", role=c("aut", "cre"),
email = "[email protected]"),
person("Paul", "Goulart", role=c("aut", "cph")),
Expand All @@ -10,13 +10,12 @@ Authors@R: c(person("Balasubramanian", "Narasimhan", role=c("aut", "cre"),
comment = "For vendoring/Makefile hints/R scripts for generating crate authors/licenses"),
person(given = "The authors of the dependency Rust crates", role = c("ctb"),
comment = "see inst/AUTHORS file for details"))
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.
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.
License: Apache License (== 2.0)
SystemRequirements: Cargo (rustc package manager) and GNU make
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Config/rextendr/version: 0.3.1
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
URL: https://oxfordcontrol.github.io/clarabel-r/
BugReports: https://github.com/oxfordcontrol/clarabel-r/issues
Suggests:
Expand All @@ -25,3 +24,6 @@ Suggests:
rmarkdown,
tinytest
VignetteBuilder: knitr
SystemRequirements: Cargo (Rust package manager), rustc and GNU Make
Imports:
methods
155 changes: 114 additions & 41 deletions LICENSE.note
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
This package contains the Rust source code of the dependencies in src/rust/vendor.tar.xz
The authorships and the licenses are listed below. In summary, all libraries are
distributed either under the MIT license or under MIT/Apache-2.0 dual license [1].

Note that, when Cargo (Rust’s build system and package manager) is not installed
on the machine, the pre-compiled binary will be downloaded on building this
package. The binary is compiled using the same Rust code, so the authorships and
the licenses are the same as listed here.

[1]: The unicode-indent library shows 'Unicode-DFS-2016' license because it
contains some test data generated by using the Unicode Character Database.
So, this license is not applied to the actual sources that get compiled.
Please refer to the License section of the library's README
(https://crates.io/crates/unicode-ident) for the details.

===============================

Name: aho-corasick
Files: vendor/aho-corasick/*
Authors: Andrew Gallant
Expand All @@ -38,7 +34,7 @@ License: Apache-2.0 OR MIT

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

------------------------------
Expand All @@ -57,6 +53,13 @@ License: Apache-2.0/MIT

------------------------------

Name: cc
Files: vendor/cc/*
Authors: Alex Crichton
License: MIT OR Apache-2.0

------------------------------

Name: cfg-if
Files: vendor/cfg-if/*
Authors: Alex Crichton
Expand Down Expand Up @@ -113,31 +116,24 @@ License: MIT/Apache-2.0

------------------------------

Name: enum_dispatch
Files: vendor/enum_dispatch/*
Authors: Anton Lazarev
Name: either
Files: vendor/either/*
Authors: bluss
License: MIT OR Apache-2.0

------------------------------

Name: extendr-api
Files: vendor/extendr-api/*
Authors: andy-thomason, Thomas Down, Mossa Merhi Reimert, Claus O. Wilke, Hiroaki Yutani, Ilia A. Kosenkov, Michael Milton
License: MIT

------------------------------

Name: extendr-engine
Files: vendor/extendr-engine/*
Authors: andy-thomason, Thomas Down, Mossa Merhi Reimert, Claus O. Wilke, Hiroaki Yutani, Ilia A. Kosenkov
License: MIT
Name: enum_dispatch
Files: vendor/enum_dispatch/*
Authors: Anton Lazarev
License: MIT OR Apache-2.0

------------------------------

Name: extendr-macros
Files: vendor/extendr-macros/*
Authors: andy-thomason, Thomas Down, Mossa Merhi Reimert, Claus O. Wilke, Hiroaki Yutani, Ilia A. Kosenkov
License: MIT
Name: equivalent
Files: vendor/equivalent/*
Authors:
License: Apache-2.0 OR MIT

------------------------------

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

------------------------------

Name: hashbrown
Files: vendor/hashbrown/*
Authors: Amanieu d'Antras
License: MIT OR Apache-2.0

------------------------------

Name: ident_case
Files: vendor/ident_case/*
Authors: Ted Driggs
License: MIT/Apache-2.0

------------------------------

Name: indexmap
Files: vendor/indexmap/*
Authors:
License: Apache-2.0 OR MIT

------------------------------

Name: itertools
Files: vendor/itertools/*
Authors: bluss
License: MIT OR Apache-2.0

------------------------------

Name: itoa
Files: vendor/itoa/*
Authors: David Tolnay
License: MIT OR Apache-2.0

------------------------------

Name: lapack-src
Files: vendor/lapack-src/*
Authors: Balasubramanian Narasimhan, Ivan Ukhov, Mitsutoshi Aoe, Stefan Kroboth, Toshiki Teramura
Authors: Balasubramanian Narasimhan, Ivan Ukhov, Michael Zietz, Mitsutoshi Aoe, Stefan Kroboth, Toshiki Teramura
License: Apache-2.0/MIT

------------------------------
Expand Down Expand Up @@ -190,17 +214,10 @@ License: MIT OR Apache-2.0

------------------------------

Name: libR-sys
Files: vendor/libR-sys/*
Authors: andy-thomason, Thomas Down, Mossa Merhi Reimert, Claus O. Wilke, Ilia A. Kosenkov, Hiroaki Yutani
License: MIT

------------------------------

Name: memchr
Files: vendor/memchr/*
Authors: Andrew Gallant, bluss
License: Unlicense/MIT
License: Unlicense OR MIT

------------------------------

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

------------------------------

Name: paste
Files: vendor/paste/*
Authors: David Tolnay
License: MIT OR Apache-2.0

------------------------------

Name: proc-macro2
Files: vendor/proc-macro2/*
Authors: David Tolnay, Alex Crichton
Expand All @@ -253,16 +263,79 @@ License: MIT

------------------------------

Name: regex-automata
Files: vendor/regex-automata/*
Authors: The Rust Project Developers, Andrew Gallant
License: MIT OR Apache-2.0

------------------------------

Name: regex-syntax
Files: vendor/regex-syntax/*
Authors: The Rust Project Developers
Authors: The Rust Project Developers, Andrew Gallant
License: MIT OR Apache-2.0

------------------------------

Name: regex
Files: vendor/regex/*
Authors: The Rust Project Developers
Authors: The Rust Project Developers, Andrew Gallant
License: MIT OR Apache-2.0

------------------------------

Name: ryu
Files: vendor/ryu/*
Authors: David Tolnay
License: Apache-2.0 OR BSL-1.0

------------------------------

Name: savvy-bindgen
Files: vendor/savvy-bindgen/*
Authors: Hiroaki Yutani
License: MIT

------------------------------

Name: savvy-ffi
Files: vendor/savvy-ffi/*
Authors: Hiroaki Yutani
License: MIT

------------------------------

Name: savvy-macro
Files: vendor/savvy-macro/*
Authors: Hiroaki Yutani
License: MIT

------------------------------

Name: savvy
Files: vendor/savvy/*
Authors: Hiroaki Yutani
License: MIT

------------------------------

Name: serde_derive
Files: vendor/serde_derive/*
Authors: Erick Tryzelaar, David Tolnay
License: MIT OR Apache-2.0

------------------------------

Name: serde_json
Files: vendor/serde_json/*
Authors: Erick Tryzelaar, David Tolnay
License: MIT OR Apache-2.0

------------------------------

Name: serde
Files: vendor/serde/*
Authors: Erick Tryzelaar, David Tolnay
License: MIT OR Apache-2.0

------------------------------
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
export(clarabel)
export(clarabel_control)
export(solver_status_descriptions)
importFrom(methods,as)
useDynLib(clarabel)
useDynLib(clarabel, .registration = TRUE)
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# clarabel 0.9.0

- Synced up to version 0.9.0 of Clarabel.rs
- Added all applicable tests from Clarabel.rs
- Updated documentation of cone specification
- Updated vignette
- Switched to savvy from rextendr

# clarabel 0.5.1

- Clarabel now supports semidefinite programs (syncing up to version 0.5.1 of Clarabel.rs)
Expand Down
31 changes: 31 additions & 0 deletions R/000-wrappers.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Generated by savvy: do not edit by hand
#
# Note:
# This wrapper file is named as `000-wrappers.R` so that this file is loaded
# first, which allows users to override the functions defined here (e.g., a
# print() method for an enum).

#' @useDynLib clarabel, .registration = TRUE
#' @keywords internal
NULL

# Check class and extract the external pointer embedded in the environment
.savvy_extract_ptr <- function(e, class) {
if(is.null(e)) {
return(NULL)
}

if(inherits(e, class)) {
e$.ptr
} else {
msg <- paste0("Expected ", class, ", got ", class(e)[1])
stop(msg, call. = FALSE)
}
}


clarabel_solve <- function(m, n, Ai, Ap, Ax, b, q, Pi, Pp, Px, cone_spec, r_settings) {
.Call(savvy_clarabel_solve__impl, m, n, Ai, Ap, Ax, b, q, Pi, Pp, Px, cone_spec, r_settings)
}


7 changes: 3 additions & 4 deletions R/clarabel-package.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#' Interface to Clarabel solver implemented in Rust.
#'
#' @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/>.
#' @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/>.
#'
#' @name clarabel-package
#' @useDynLib clarabel
#' @docType package
#' @author Balasubramanian Narasimhan, Paul Goulart, Yuwen Chen
#' @keywords package
NULL
#' @keywords internal
"_PACKAGE"
Loading
Loading