Module: Quicopt

Defined in:
lib/quicopt.rb,
lib/quicopt/wire.rb,
lib/quicopt/model.rb,
lib/quicopt/client.rb,
lib/quicopt/version.rb

Overview

SPDX-License-Identifier: Apache-2.0 SPDX-FileCopyrightText: (c) 2026 Tim Bode, PGI-12, Forschungszentrum Jülich frozen_string_literal: true

Defined Under Namespace

Modules: Format, Operators, Wire Classes: Client, Constraint, Error, Expression, Job, Model, QuicoptError, Result, UnsupportedExpression, Variable

Constant Summary collapse

Program =

The structured message a model becomes, re-exported so callers can inspect the bytes or route them themselves rather than going through Client.

Wire::PB::Program
DEFAULT_BASE_URL =

The public Quicopt free-tier endpoint a Client targets when no base_url is given. Mirrors the Python and Julia clients' default, so every client reaches the same server out of the box.

"https://try.quicoptapi.pgi.fz-juelich.de"
SOURCE_LANGUAGE =

The modelling library a model was written in, sent as the source_language call tag. It names the library, not the programming language — the service also sees jump, pyomo, pulp and mathopt — so this gem's own DSL carries its own name here.

"quicopt-ruby"
KEY_PATH_ENV =

Environment variable overriding where the free key is cached. Point it at durable storage in an environment whose home directory does not survive the run (CI, containers), where the default location is wiped between sessions and every run would otherwise mint a fresh key.

"QUICOPT_KEY_PATH"
VERSION =

The gem version, tracking the client — not the wire schema, which is versioned separately by its protobuf package (quicopt.modeler.v1).

"0.1.0"

Class Method Summary collapse

Class Method Details

.decode(bytes) ⇒ Program

Parse bytes back into a Program.

Parameters:

  • bytes (String)

Returns:



45
46
47
# File 'lib/quicopt.rb', line 45

def decode(bytes)
  Wire.decode(bytes)
end

.encode(model) ⇒ String

Encode a model to bytes.

Parameters:

Returns:

  • (String)

    binary protobuf bytes



37
38
39
# File 'lib/quicopt.rb', line 37

def encode(model)
  Wire.encode(model)
end