Skip to contents

Queues the model and returns immediately with a job handle; the solve runs on the service while your session goes on. Await it with job_result(), peek with job_status() or job_log(), and discard it with job_delete(). The arguments are those of solve_model(); the handle keeps the connection settings, so the polling calls need none of them repeated.

Usage

submit(
  m,
  base_url = DEFAULT_BASE_URL,
  api_key = NULL,
  project = NULL,
  config = NULL,
  gzip = FALSE,
  timeout = 60,
  transport = NULL
)

Arguments

m

A model(), a program(), or already-encoded bytes.

base_url

The service to talk to; defaults to DEFAULT_BASE_URL.

api_key

A key you hold, or NULL to mint and reuse a free-tier key.

project

A project tag for per-project invoicing, or NULL.

config

Named list of extra query parameters; a source_language here overrides the automatic tag.

gzip

Compress the request body.

timeout

Seconds to wait for the service.

transport

The HTTP layer, replaceable for testing: a function(req) taking list(method, url, headers, body, timeout) and returning list(status, headers, body).

Value

A quicopt_job handle.