Description Usage Arguments Value Examples
Load LSP model example code.
1 | lsp.model.example(example.file)
|
example.file |
example file path relative to packaged root. |
text of model formulated in LSP language.
1 | lsp.model.example('extdata/knapsack.txt')
|
[1] "function model() {\n x[i in 1..nbItems] <- bool();\n \n // weight constraint\n knapsackWeight <- sum[i in 1..nbItems](itemWeights[i] * x[i]);\n constraint knapsackWeight <= knapsackBound;\n \n // maximize value\n knapsackValue <- sum[i in 1..nbItems](itemValues[i] * x[i]);\n maximize knapsackValue;\n}"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.