> For the complete documentation index, see [llms.txt](https://docs.akamas.io/akamas-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.akamas.io/akamas-docs/3.5.0/reference/glossary/goals-and-constraints.md).

# Goals & Constraints

The **optimization goal** defines the objective of an [optimization study](/akamas-docs/3.5.0/reference/glossary/optimization-studies.md) to be achieved by changing the system parameters to modify the system behavior while also satisfying any defined **optimization constraints** on the system metrics, possibly representing SLOs.

## Construct

A **goal** is defined by:

* an optimization objective: either maximize or minimize
* a scoring function (scalar): either a single metric or a formula defined by one or more metrics

One or more **constraints** can be associated with a goal

* a formula defined on one or more metrics, referring to either absolute values (**absolute** **constraints**) or relative to a baseline value (**relative constraints**)

Notice that relative constraints are only supported by [offline optimization studies](/akamas-docs/3.5.0/using/study/offline-optimization-study.md) while absolute constraints are supported by both offline and [online optimization studies](/akamas-docs/3.5.0/using/study/offline-optimization-study.md).

Goals and constraints are not an [Akamas resource](/akamas-docs/3.5.0/reference/cli-reference.md#clireference-operations) as they are defined as part of an optimization study. The construct to be used to define a goal and its constraints are described in the [Goal & Constraint](/akamas-docs/3.5.0/reference/construct-templates/study-template/goal-and-constraints.md) page of the [Study template](/akamas-docs/3.5.0/reference/construct-templates/study-template.md) section.

## Commands

Goals and constraints are not an [Akamas resource](/akamas-docs/3.5.0/reference/cli-reference.md#clireference-operations) and are always defined as part of an optimization study.

## User Interface

Goals and constraints are displayed in the Akamas UI when drilling down each optimization study.

<figure><img src="https://3774185011-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJSNpKvJ3IYa5Vo69I0ed%2Fuploads%2Fgit-blob-f0ca25c66f444dcc0296b12402642bb0e2a505bf%2FScreenshot%202022-12-22%20at%2010.07.39.png?alt=media" alt=""><figcaption></figcaption></figure>

The detail of the formula used to define the goal may also be displayed:

<figure><img src="https://3774185011-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJSNpKvJ3IYa5Vo69I0ed%2Fuploads%2Fgit-blob-af8af41fa5d770bc95226dff065f4d1425159e96%2FScreenshot%202022-12-22%20at%2010.09.39.png?alt=media" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.akamas.io/akamas-docs/3.5.0/reference/glossary/goals-and-constraints.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
