net
{
    node_size = (150 50);
    HR_Node_Label_Style = "0";
    HR_Desc = "In a chest clinic, the patients can have tuberculosis, lung cancer, and/or bronchitis (or none of these). To determine the state of the patient, the doctor can make two observations: X-rays, and whether the patient suffers from dyspnoea.\nFurthermore, the doctor can ask the patient if he has been to asia and whether or not he is a smoker.\n\nWith this information, a diagnosis is made.";
    HR_OOBN_FitExpand = "1";
    HR_Zoom_ZoomFactor = "100";
    HR_Color_Interface = "21";
    HR_Color_Instance = "0";
    HR_Color_ContinuousChance = "32";
    HR_Compile_MaxMinimalSeparators = "100000";
    HR_Color_DiscreteChance = "16";
    HR_Color_ContinuosChance = "48";
    HR_Color_Utility = "36";
    HR_Color_Decision = "17";
    HR_Groups_UserGroupsNo = "0";
    HR_Groups_GroupNames = "test\t";
    HR_Groups_GroupColors = "47";
    HRUNTIME_Monitor_OpenGraph = "0";
    HRUNTIME_Monitor_GraphPrecision = "100";
    HRUNTIME_Monitor_AutoUpdGraph = "0";
    HRUNTIME_Compile_ApproxEpsilon = "0.00001";
    HRUNTIME_Compile_Approximate = "0";
    HRUNTIME_Compile_Compress = "0";
    HRUNTIME_Compile_TriangMethod = "0";
    HRUNTIME_Propagate_AutoNormal = "1";
    HRUNTIME_Propagate_AutoSum = "1";
    HRUNTIME_Propagate_Auto = "0";
    HRUNTIME_Font_Italic = "0";
    HRUNTIME_Font_Weight = "400";
    HRUNTIME_Font_Size = "-12";
    HRUNTIME_Font_Name = "Arial";
    HRUNTIME_Grid_GridShow = "0";
    HRUNTIME_Grid_GridSnap = "1";
    HRUNTIME_Grid_Y = "10";
    HRUNTIME_Grid_X = "10";
    HR_Grid_X = "25";
    HR_Grid_Y = "25";
    HR_Grid_GridSnap = "1";
    HR_Grid_GridShow = "0";
    HR_Font_Name = "Arial";
    HR_Font_Size = "-12";
    HR_Font_Weight = "400";
    HR_Font_Italic = "0";
    HR_Propagate_Auto = "1";
    HR_Propagate_AutoSum = "1";
    HR_Propagate_AutoNormal = "1";
    HR_Compile_TriangMethod = "0";
    HR_Compile_Compress = "0";
    HR_Compile_Approximate = "0";
    HR_Compile_ApproxEpsilon = "0.00001";
    HR_Monitor_AutoUpdGraph = "0";
    HR_Monitor_GraphPrecision = "100";
    HR_Monitor_OpenGraph = "0";
    HR_Monitor_InitStates = "5";
    HR_Monitor_InitSD = "2";
}

node B
{
    label = "Has bronchitis";
    position = (435 185);
    states = ("yes" "no");
}

node D
{
    label = "Dyspnoea?";
    position = (360 35);
    states = ("yes" "no");
}

node A
{
    label = "Visit to Asia?";
    position = (85 260);
    states = ("yes" "no");
    HR_Desc = "A visit to asia increases the risk of tuberculosis.";
}

node S
{
    label = "Smoker?";
    position = (360 260);
    states = ("yes" "no");
    HR_Desc = "Smoking increases the risk of both lung cancer and bronchitis (at least in this example)";
}

node T
{
    label = "Has tuberculosis";
    position = (85 185);
    states = ("yes" "no");
}

node L
{
    label = "Has lung cancer";
    position = (260 185);
    states = ("yes" "no");
}

node E
{
    label = "Tuberculosis or cancer";
    position = (160 110);
    states = ("yes" "no");
    HR_Desc = "This node is a deterministic variable. It helps reduce the number of parent configurations for the x-ray node, since the result of the x-ray will be positive if the patient has either tuberculosis or lung cancer, and negative if the patient has none of these.";
}

node X
{
    label = "Positive X-ray?";
    position = (85 35);
    states = ("yes" "no");
    HR_Desc = "The doctor can have x-rays taken of the patient to determine the state of the lungs.";
}

potential (B | S)
{
    data
     = (( 0.6 0.4 )	%  S=yes
	( 0.3 0.7 ));	%  S=no
}

potential (D | B E)
{
    data
     = ((( 0.9 0.1 )	%  B=yes  E=yes
	 ( 0.8 0.2 ))	%  B=yes  E=no
	(( 0.7 0.3 )	%  B=no  E=yes
	 ( 0.1 0.9 )));	%  B=no  E=no
}

potential (A)
{
    data = ( 0.01 0.99 );
}

potential (S)
{
    data = ( 0.5 0.5 );
}

potential (T | A)
{
    data
     = (( 0.05 0.95 )	%  A=yes
	( 0.01 0.99 ));	%  A=no
}

potential (L | S)
{
    data
     = (( 0.1 0.9 )	%  S=yes
	( 0.01 0.99 ));	%  S=no
}

potential (E | T L)
{
    data
     = ((( 1 0 )	%  T=yes  L=yes
	 ( 1 0 ))	%  T=yes  L=no
	(( 1 0 )	%  T=no  L=yes
	 ( 0 1 )));	%  T=no  L=no
}

potential (X | E)
{
    data
     = (( 0.98 0.02 )	%  E=yes
	( 0.05 0.95 ));	%  E=no
}
