docplexcloud: IBM Decision Optimization on Cloud R Client

Description Details Examples

Description

IBM Decision Optimization on Cloud (DOcplexcloud) enables you to solve optimization problems on the cloud without installing or configuring a solver.

Details

This client handles the connection for you so that you can jump into coding faster.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
# Create a new client, using environment variables for URL and API key
client <- DOcplexCloudClient$new()

# Create and run a job to solve model.lp
job <- client$submitJob(addAttachment(file="model.lp"))

# Wait for the job to complete
status <- client$waitForCompletion(job)

# When solving an .lp file, DOcplexcloud creates an output attachment
# called 'solution.json' with the CPLEXSolution. This downloads the attachment
# and parses the JSON to a hierarchy of lists.
solution <- client$getAttachment(job, "solution.json")

# In particular, you can access variables like this:
variables = solution$CPLEXSolution$variables

## End(Not run)

IBMDecisionOptimization/DOcplexcloud-R-client documentation built on May 7, 2019, 5:04 a.m.