# 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](../../akamas-reference/glossary/live-optimization-studies) and an [offline optimization study](../../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](creating-optimization-studies/defining-optimization-goal-and-constraints)
* [defining the optimization parameters & metrics](creating-optimization-studies/defining-optimization-steps)
* [defining the optimization steps](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](../../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](../../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](creating-optimization-studies/defining-windowing-policies) (optional - typically after defining the goal & constraints)
* [defining KPIs](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](../../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](creating-optimization-studies/defining-workloads) (mandatory - typically after defining the goal & constraints)
* [setting safety policies](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>
