.. index:: Case Files

.. _Case_Files:

Case Files
==========

The HUGIN Graphical User Interface supports saving and loading of case files. A case file contains a description of a single evidence scenario. Figure 1 shows a sample case file.

.. figure:: images/CaseFiles.png

	Figure 1: A sample case file.

As indicated in Figure 1, each line of a case file contains information about the evidence for a single variable. In general, each line of a case file must obey the following syntax:

::

	<variable name>: <value> [% <comment>]

where

:: 

	<value> : \:= "<state label>" | true | false | <number> | #<state index>


The choice of syntax for <value> depends on the :ref:`category<node_category>` and :ref:`type<node_type>` of the variable/node. For labeled nodes <value> must be specified using the "<state label>" syntax. For Boolean nodes <value> must be either 'true' or 'false'. For numbered nodes or :ref:`continuous chance nodes<continuous_chance_node>` <value> must be a number (e.g., 1, -4.2). For interval nodes <value> must be specified as #i, where i is the index of the state in question (the first state has index 0).

A case file can be generated via the "Save Case..." item of the :ref:`File Menu<File_menu>` whenever the HUGIN Graphical User Interface is in :ref:`Run Mode<run_mode>` and evidence has been entered. Similarly, in :ref:`Run Mode<run_mode>`, a case can be loaded via the "Load Case..." item. Please note that possible evidence already entered is removed when a case is loaded.