This packages implements a two-step, population-based, hybrid optimization algorithm, for solving problems of the form:
\[ \begin{array}{c} \max_{x, \tilde{x}} f(x, \tilde{x}) ~~s.t.~~ g(x, \tilde{x}) \geq 0,~ \tilde{g}(\tilde{x}) \geq 0,\\ x \in X,~ \tilde{x} \in \tilde{X} \end{array} \]
The paper fully describing the motivation, theoretical framework, and method design is available at vignette("theoretical_framework", package = "phyopt")
.
For now, see the vignette vignette("example", package = "phyopt")
, which contains a simple example but a thorough explanation of how the package works. Additionally, see the documentation for the optimize_phy()
function, which is the main function of the package
Disclaimer: this package is in the early most stage of life. It hasn’t been thoroughly tested and can present several bugs. I don’t recommend using it for large-scale projects, yet.
Please report any problems as a GitHub issue. Other comments can be posted as a GitHub discussion, or sent in my email below. Thank you!
Author: Ricardo Semião e Castro (ricardo.semiao@outlook).
Installation
You can install the development version of phyopt like so:
# install.packages("devtools")
devtools::install_github("ricardo-semiao/phyopt")
Development Comments
This package is young, and puts much of the responsibility of the optimization on the user. Having said that, I think it is decently solid. Once I implement tests and run more examples, I figure it will be already stable.
Some of the more important features I plan to add in the future are:
- The
testthat
package structure is created for the package, but I haven’t had the time to write unir tests yet. - Add more complicated examples to
vignette("example", package = "phyopt")
. - Expand the suggested metrics on
get_metrics
, also add suggestions formatters for thelogger
object. - Add suggested operators for
optimize_phy()
, with common initializers, optimizers, and updaters from the literature. - Add an
on.exit()
call tooptimize_pbhy()
, such that it safely returns what it had before reaching an eventual error. - Create
summary()
andplot()
methods for theoptimize_pbhy()
result.
Note that this package:
- Follows the tydiverse style guide.
- Uses testthat 3 for automate tests.
- Uses rlang frameworks for tidy eval and rlang errors.