Description Usage Arguments Details Value Author(s) See Also Examples

`addVariable`

creates a new variable (continuous,
integer or binary) and adds it to a linear program (LP) or
mixed integer program (MIP) represented by an object of
class `lpmodeler`

.

1 | ```
addVariable(p, t = c("C", "I", "B"), o = 0, name = NULL)
``` |

`p` |
an object of class |

`t` |
type of the variable to create, C = continuous (default), I = integer, B = binary |

`o` |
numeric value representing the coefficient of the variable in the objective function (objective point), 0 by default |

`name` |
an optional string to name the new variable |

TODO

An object of class `lpmodeler`

.

Cyrille Szymanski <cnszym at gmail.com>

TODO

1 2 3 4 5 6 | ```
p <- newProblem()
# add an integer variable called x to the
# problem, and set its coefficient in the
# objective function to a value of 5.
p <- addVariable(p, "I", 5, "x")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.