Overview#
In the following chapters, we will go through the essential basics for working with mathematical optimization problems in JijModeling. We will also introduce the Plain API and the Decorator API side by side when it is helpful, as mentioned in the Introduction chapter. Before moving on, it helps to skim at least one of the quickstarts (SCIP or OpenJij versions) to get a feel for the overall workflow.
See also
For a general introduction to mathematical optimization, see other references such as JijZept’s “Basics of Mathematical Optimization”.
This part covers the following topics:
Declaring a mathematical model: In JijModeling, variables and constraints are always registered into a specific mathematical model. We start with how to declare a model.
Variables in JijModeling: We discuss the kinds of variables that are basic components of mathematical models, such as placeholders and decision variables.
User-provided variables: placeholders and category labels: How to declare placeholders, variables whose values are provided by users when compiling a mathematical model, and category labels.
Solver-determined variables: decision variables: How to declare decision variables, variables whose values are determined by a solver after compilation.
JijModeling Expressions and Types: A brief introduction to JijModeling expressions and their types, which are used for objectives, constraints, and variable shapes.
Arithmetic and Conditional Expressions: Arithmetic and comparison operations available in expressions.
Operations on Arrays and Dictionaries: Data structures such as arrays and dictionaries available in expressions.
Folding and Streams: How to sum arrays and dictionaries as streams and combine conditions with logical operations.
Mathematical Model Formulation: How to set objectives and constraints using the elements above.
Instance Generation: How to provide instance data and generate instances, with a brief note on the configuration of constraint detection.
Terminology#
Throughout this document, “natural numbers” mean non-negative integers including \(0\). We also use “scalar” to collectively refer to natural numbers, integers, and real numbers. A constant expression that represents a concrete numeric value without any variables, such as \(1, 2, 3\) or \(5.2\), is called a “constant literal”.