Skip to content

R package for solving complex linear problems.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

benet1one/EasyLP

Repository files navigation

Installing

Use devtools to install this package from GitHub. Make sure to build vignettes!

# install.packages("devtools")
devtools::install_github("benet1one/EasyLP", build_vignettes = TRUE)

Getting Started

First, create the problem by using easylp$new(). Then define variables with $var(), set the objective function with $min() or $max(), and constraint the problem with $con(). Then, solve the problem and print the results.

library(easylp)
lp <- easylp$new()
lp$var("x")
lp$var("y")
lp$max(x + y)
lp$con(
    x + 2*y <= 3,
    y >= 3*x - 2
)

lp$solve()
lp

## Easy Linear Problem 
## Status: optimal
## Objective Value = 2
## 
## Solution:
##
## $x
## [1] 1
##
## $y
## [1] 1

Learn more with vignettes

Make sure to build_vignettes = TRUE and discover everything you can do using the powerful and intuitive syntax.

vignette("easylp")
vignette("objective")
vignette("constraints")

About

R package for solving complex linear problems.

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Languages