# Creating optimization studies

The final preparatory step before running a study is to actually create the study, which also requires several substeps.

<figure><img src="https://1840531935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC1d2wNp5yTa9gnHgSILG%2Fuploads%2Fgit-blob-8f4e0e9659d07a4d83436978b3183329fbf2f193%2FScreenshot%202023-01-25%20at%2017.20.43.png?alt=media" alt=""><figcaption><p>Preparing an optimization: creating an optimization study</p></figcaption></figure>

Most of the substeps are common for both a [live optimization study](https://docs.akamas.io/akamas-docs/3.2.0/akamas-reference/glossary/live-optimization-studies) and an [offline optimization study](https://docs.akamas.io/akamas-docs/3.2.0/akamas-reference/glossary/offline-optimization-study), even if they might need to be conceived differently in these two different contexts:

* [defining the optimization goal & constraints](https://docs.akamas.io/akamas-docs/3.2.0/using-akamas/preparing-optimization-studies/creating-optimization-studies/defining-optimization-goal-and-constraints)
* [defining the optimization parameters & metrics](https://docs.akamas.io/akamas-docs/3.2.0/using-akamas/preparing-optimization-studies/creating-optimization-studies/defining-optimization-steps)
* [defining the optimization steps](https://docs.akamas.io/akamas-docs/3.2.0/using-akamas/preparing-optimization-studies/creating-optimization-studies/defining-optimization-steps)

Other optional and mandatory steps are specific for offline optimization studies ([see below](#offline-optimization-studies)) and live optimization studies ([see below](#live-optimization-studies)).

The [Study template](https://docs.akamas.io/akamas-docs/3.2.0/akamas-reference/construct-templates/study-template) section of the reference guide describes the template for creating a study, while the commands for creating a study are on the [Resource Management command](https://docs.akamas.io/akamas-docs/3.2.0/akamas-reference/cli-reference/cli-reference-2) page. For offline optimization studies only, the Akamas UI displays the "Create a study" button that provides a visual step-by-step procedure for creating a new optimization study (see the following figure).

<figure><img src="https://1840531935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC1d2wNp5yTa9gnHgSILG%2Fuploads%2Fgit-blob-b37976c935b1e2f2ef8f529b8045975c3d297970%2FScreenshot%202023-01-23%20at%2009.58.51.png?alt=media" alt=""><figcaption><p>Akamas UI for creating offline optimization studies</p></figcaption></figure>

### Offline optimization studies

For offline optimization studies, there are some additional (optional) steps:

* [defining windowing policies](https://docs.akamas.io/akamas-docs/3.2.0/using-akamas/preparing-optimization-studies/creating-optimization-studies/defining-windowing-policies) (optional - typically after defining the goal & constraints)
* [defining KPIs](https://docs.akamas.io/akamas-docs/3.2.0/using-akamas/preparing-optimization-studies/creating-optimization-studies/defining-kpis) (optional - typically after defining the goal & constraints)

<figure><img src="https://1840531935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC1d2wNp5yTa9gnHgSILG%2Fuploads%2Fgit-blob-636ef1406941aab0c307d4f1e79a1c575274f110%2FScreenshot%202023-01-24%20at%2017.47.08%20(1).png?alt=media" alt=""><figcaption><p>Preparing an optimization: creating an offline optimization study</p></figcaption></figure>

Notice that Akamas also allows existing offline optimization studies to be **duplicated** either from the Akamas UI (see the following figure) or from the command line (refer to the [Resource management commands](https://docs.akamas.io/akamas-docs/3.2.0/akamas-reference/cli-reference/cli-reference-2) page).

### Live optimization studies

For live optimization studies, there are some additional steps - including a mandatory one:

* [defining workloads](https://docs.akamas.io/akamas-docs/3.2.0/using-akamas/preparing-optimization-studies/creating-optimization-studies/defining-workloads) (mandatory - typically after defining the goal & constraints)
* [setting safety policies](https://docs.akamas.io/akamas-docs/3.2.0/using-akamas/preparing-optimization-studies/creating-optimization-studies/setting-safety-policies) (optional - typically when defining the optimization steps)

<figure><img src="https://1840531935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC1d2wNp5yTa9gnHgSILG%2Fuploads%2Fgit-blob-8e2c0c9b04f1e853cc4a2be44b665657d5657d23%2FScreenshot%202023-01-24%20at%2017.47.01.png?alt=media" alt=""><figcaption><p>Preparing an optimization: creating a live optimization study</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.akamas.io/akamas-docs/3.2.0/using-akamas/preparing-optimization-studies/creating-optimization-studies.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
