Description Usage Arguments Value Examples
Creates a new attachment.
1 |
name |
The name of the attachment. If a |
file |
The name of the file containing the data for the attachment. |
data |
The data for the attachment. If |
An attachment object suitable for use with methods of
DOcplexcloudClient
and DOcplexcloudJob
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Creates an attachment whose content is the content of this file,
# and whose name is "model.lp" (the 3 expressions are equivalent):
a <- addAttachment(file = "/home/joe/models/model.lp")
a <- addAttachment(name = "/home/joe/models/model.lp")
a <- addAttachment("/home/joe/models/model.lp")
# Creates an attachment whose content is the specified file, and
# whose name is "model.lp"
a <- addAttachment(name = "model.lp",
file = "/home/joe/models/model_1231.lp")
# Create an attachment whose data is stored in memory
model <- "Minimize
obj: x + y
Subject To
Bounds
3 <= x <= 17
2 <= y
End"
a <- addAttachment(name="model.lp",
data=charToRaw(model))
## Not run:
# Submits and runs the specified model.lp:
job <- client$submitJob(addAttachment("/home/joe/models/model.lp"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.