##### Declaring variables

How to declare variables?

What do you need to know to express a problem?

The object `Model`

is the key component. It is built as follows:

```
Model model = new Model();
```

or:

```
Model model = new Model("my problem");
```

`Model`

is the top-level object that stores declared variables, posted constraints and gives access to the `Solver`

.

This should be the first instruction, prior to any other modeling instructions, as it is needed to declare variables and constraints.

Once the model is created, variables and constraints can be defined.

How to declare variables?

How to handle constraints?

Overview of constraints based on boolean and integer variables.

How to build and use expressions?

Overview of constraints based on set variables.

How to declare constraints based on real variables?

Was this page helpful?

Glad to hear it! Please tell us how we can improve.

Sorry to hear that. Please tell us how we can improve.

Last modified 02.02.2020: small modifs and correct some typo (cafa1be)