Manage Cases
============

A case is a complete set of input data and results. A project file contains at least one case. SAM uses tabs to display each case in the file, analogous to the way Excel displays worksheets in a workbook.

SAM highlights the active case name:

.. image:: ../images/SS_MainWindow-CaseTabsActive.png
   :align: center
   :alt: SS_MainWindow-CaseTabsActive.png

When there are more cases than can be displayed, click the ellipses to list the cases that are not visible:

.. image:: ../images/SS_CaseMenu-TooManyCases.png
   :align: center
   :alt: SS_CaseMenu-TooManyCases.png

Why Use Cases?
~~~~~~~~~~~~~~

By creating more than one case in a file, you can easily compare the assumptions and results of different analysis scenarios. For example, you could use cases to compare the cost and performance of a residential photovoltaic system in several locations by defining a separate case for each location, or you could compare a utility-scale photovoltaic and concentrating solar power systems.

.. note:: You can use the :doc:`inputs browser <inputs_browser>` to compare values of input variables in different cases.

Creating, Renaming, and Deleting Cases
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To create a new case in your file:

* Click New.

.. image:: ../images/SS_MainWindow-CaseCreate.png
   :align: center
   :alt: SS_MainWindow-CaseCreate.png

To add, remove, and rename a case:

* Click the |SS_Button-ContextArrow| arrow to display the :doc:`case menu <case_menu>` and click a command.

.. image:: ../images/SS_MainWindow-CaseMenu.png
   :align: center
   :alt: SS_MainWindow-CaseMenu.png

**Rename**
  Change the label identifying the case that appears on the case tab.

**Duplicate**
  Create a copy of the active case, with a duplicate set of input parameters and results.

**Delete**
  Delete the active case.

For a file with more cases than can fit on the toolbar, click the ellipses to show a list of cases that do not fit:

.. image:: ../images/SS_MainWindow-CaseTabsScroll.png
   :align: center
   :alt: SS_MainWindow-CaseTabsScroll.png



.. |SS_Button-ContextArrow| image:: ../images/SS_Button-ContextArrow.png
