Expressions

An expression is a combination betwwen operators and operands organised as a Direct Acyclic Graph (DAG). The leafs of such a DAG can be values, constants or variables or any access path to a constant or a variable.

Numerical expressions

A numerical expression is an expression that combines numerical operators and operands.

Boolean expressions

A boolean expression is an expression that combines boolean operators and operands. The leafs of a boolean expression has to be boolean values, boolean constants or boolean variables.

Named Expressions

A name can be associated to an expression. In such a case the name of the expression is declared as an expr variables in the variables part of a Model or Problem. The association between the name and the expression is done with the := operator in the properties part as follow:

<exprname> := <expr>;

Note

The whole set of named expressions in a Problem has to be a Direct Acyclic Graph (DAG).

Optimization criterion

A variable can be considered as an objective to minimize. In such a case the name of the expression to minimize is declared as an obj variables in the variables part of a Model or Problem. The association between the name and the expression is done with the := operator in the properties part as follow:

<objname> := <expr>;

Note

There is almost one objective to minimize in a DEPS Project. Properties can be posted on an objective. The objective can be part of any properties of the problem.

Example

Problem ExOfExpr
Constants

Variables
x : Real [-100, 100];
y : Real in [0, 100];

expr fact : Real;   (* expr declaration *)
obj f : Real;       (* f is declared as an objective to minimize *)

Elements

Properties

fact := (x-1)^2;          (* definition of the expr fact which is shared by two terms of the f expression *)
f := ln(y*fact) + fact/x; (* definition of the objective f *)

End