Skip to contents

Authoring a model

model()
Create an empty optimization model
num_var() int_var() bin_var() add_var()
Declare decision variables
minimize() maximize()
State what the model optimizes
add()
Add constraints to a model
expressions
quicopt expressions — model arithmetic in plain R

Uncertainty

stochastic
Optimization under uncertainty
rand_var() add_rand_var()
Declare a random variable
set_distribution()
Give a random variable its distribution
set_scenarios()
Set how many scenarios are drawn, and from which seed
set_empirical()
Turn observed history into a model's uncertainty
distribution() normal()
Distributions for random variables
empirical()
A random variable given as a fixed scenario column
expectation()
The expected value over the scenarios
cvar()
The conditional value at risk at level alpha
prob()
The probability that a comparison holds

Solving

solve_model() solve(<quicopt_model>)
Solve a model with the Quicopt service
submit()
Submit a model for asynchronous solving
job_status() job_result() job_log() job_delete()
Poll a submitted job
DEFAULT_BASE_URL
The public Quicopt endpoint

The program and its bytes

program()
A complete optimization model as plain data
CONTINUOUS INTEGER BINARY var_decl()
A variable declaration
index_set()
A named index set with concrete elements
constraint()
A constraint row
zero() nonneg() indicator()
Constraint sets
parametric()
A random variable drawn from a distribution
ir_const() ir_param() ir_var() ir_apply() ir_reduce() ir_source_ref() ir_set_ref()
quicopt IR — a model as plain data
wire
quicopt wire — a program's bytes
encode()
Encode a program to the bytes the service reads
encode_params()
Encode parameter tables alone, for rebinding data
as_program()
Lower a model to a program