Description Usage Arguments Details Value Examples
Creates problem instance from model LSP code passed. Detects functions in model LSP code.
1 | ls.problem(model.text.lsp, ls.path = NULL)
|
model.text.lsp |
text of model formulated in LSP language. |
ls.path |
path to the LocalSolver executable. Optional argument (NULL by default). If not provided, the LocalSolver will be searched by the system in PATH environment variable. |
Functions detected in model LSP code must contain
model
function as it main 'workhorse' function of
LocalSolver model. They can contain param
,
display
and any other custom functions.
Because localsolver package defines input
function
based on data passed to ls.solve
and
output
function base on output expressions added to
problem instance with add.output.expr
these
two(input
and output
) functions cannot occur
in model LSP code passed. Passing them will cause
appropriate error.
For mode details see LocalSolver LSP language reference manual: http://www.localsolver.com/lspreferencemanual.html.
created ls.problem instance.
1 2 | model.text.lsp <- lsp.model.example('extdata/knapsack.txt')
lsp <- ls.problem(model.text.lsp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.