Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
[#81, #82] docs: update reference.md to reflect changes to objective …
Browse files Browse the repository at this point in the history
…function syntax

Signed-off-by: Lalith Suresh <[email protected]>
  • Loading branch information
lalithsuresh committed Mar 18, 2021
1 parent 9498596 commit 1ec3a2a
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,25 @@ check controllable__physical_machine = 'pm3';

### Soft constraints

A soft constraint is structured as a view that computes an integer scalar expression whose value DCM will
try to maximize. For example,
A soft constraint is structured as a view that computes a single column of integers,
whose value DCM will try to maximize, followed by the `maximize` annotation. For example,

```sql
create view objective_load_cpu as
select min(cpu_spare) from spare_cpu;
select min(cpu_spare) from spare_cpu
maximize;
```

or

```sql
create view objective_load_cpu as
select cpu_spare from spare_cpu
maximize;
```

DCM will try to maximize the sum of all objective functions. An objective function view that computes a
column expression (like the second example above) is treated as one objective function per cell in the column.

### Supported column types for inputs

Expand Down

0 comments on commit 1ec3a2a

Please sign in to comment.