Index: applications/doprava/aimsun_bdm/aimsun_ds.cpp
===================================================================
--- applications/doprava/aimsun_bdm/aimsun_ds.cpp (revision 874)
+++ applications/doprava/aimsun_bdm/aimsun_ds.cpp (revision 902)
@@ -46,5 +46,51 @@
 const int MeasurementOffsets[]  = {  6, 42 };
 
-AimsunDS::AimsunDS ( UIFile &cfg ) : DS()
+AimsunDS::AimsunDS () : DS()
+{
+  /* Description of the channels of the data vector. */
+  Drv = RV ( "{"
+    "495_VA  495_VB   495_VC   495_VD   495_VE   495_VF "
+    "495_DVA 495_DVB  495_DVA1 495_DVB1 495_DVC  495_DVD  495_DVE  495_DVF  495_DVF1 "
+    "495_S1  495_S2   495_S3   495_S4   495_S5   495_S5a "
+    "601_VA  601_VB   601_VC   601_VD   601_VE   601_SE "
+	"601_DVA 601_DVAa 601_DVB  601_DVBa 601_DVB1 601_DVC  601_DVD  601_DVD1 601_DSE 601_DVE 601_DSE1 601_DVE1 "
+    "601_S6  601_S6a  601_S7   601_S8   601_S9   601_S9a "
+    "}",
+	"    1,      1,      1,      1,      1,       1,      "
+	"    2,      2,      2,      2,      2,       2,      2,      2,      2,"
+	"    2,      2,      2,      2,      2,       2,"
+	"    1,      1,      1,      1,      1,       1,      "
+	"    2,      2,      2,      2,      2,       2,       2,       2,       2,       2,       2,       2,"
+	"    2,      2,      2,      2,      2,       2"
+	);
+  /* Remember the size of the data vector. */
+  dtsize = Drv._dsize();
+
+  /* Description of the channels of the input vector. */
+  Urv = RV ( "{"
+	  "Tc"
+	  "495_offset"
+	  "495_VA  495_VB   495_VC   495_VD   495_VE   495_VF "
+	  "601_offset"
+	  "601_VA  601_VB   601_VC   601_VD   601_VE   601_SE "
+	  "}" );
+  /* Remember the size of the input vector. */
+  utsize = Urv._dsize();
+
+  /* Initialise the pointer to received data. */
+  p_rsp = NULL;
+}
+
+void AimsunDS::from_setting ( const Setting &cfg )
+{
+	/* Check the `stop time` field in configuration. */
+	UI::get ( stopTime, cfg, "stop_time" );
+
+	/* Query the configuration file for the name of the file containsing
+	   vehicle entrances. */
+	UI::get ( entranceFileName, cfg, "entrances" );
+}
+
+void AimsunDS::validate ()
 {
 	HKEY  hKey;
@@ -62,6 +108,4 @@
 	TCHAR szExePath[MAX_EXE_PATH];	/**< Command line when staring ELS3 controllers. */
 	TCHAR szEntrancePath[MAX_PATH];	/**< Points to the CSV file with vehicle entrances for the simulation. */
-	string entranceFileName;
-	string stopTime;
 	DWORD dwBufLen = MAX_PATH_BYTES;
 	LONG  res;
@@ -214,5 +258,4 @@
 	/* Fourth modification step.
 	   Replace the `stop time` field of RunTime information. */
-	UI::get ( stopTime, cfg, "stop_time" );
 	replace_stoptime (
 		szNetPath,
@@ -220,6 +263,7 @@
 		);
 
-	StringCbCat ( szScePath, MAX_EXE_PATH, TEXT("\"") );
-	StringCbCat ( szScePath, MAX_EXE_PATH, TEXT("\"") );
+	//???
+	//StringCbCat ( szScePath, MAX_EXE_PATH, TEXT("\"") );
+	//StringCbCat ( szScePath, MAX_EXE_PATH, TEXT("\"") );
 
 	/* Spawn the process. */
@@ -270,7 +314,4 @@
 	Sleep ( 5000 );
 
-	/* Query the configuration file for the name of the file containsing
-	   vehicle entrances. */
-	UI::get ( entranceFileName, cfg, "entrances" );
 
 	/* Prepare full path for vehicle input data. */
@@ -289,36 +330,4 @@
 		);
 
-  /* Description of the channels of the data vector. */
-  Drv = RV ( "{"
-    "495_VA  495_VB   495_VC   495_VD   495_VE   495_VF "
-    "495_DVA 495_DVB  495_DVA1 495_DVB1 495_DVC  495_DVD  495_DVE  495_DVF  495_DVF1 "
-    "495_S1  495_S2   495_S3   495_S4   495_S5   495_S5a "
-    "601_VA  601_VB   601_VC   601_VD   601_VE   601_SE "
-	"601_DVA 601_DVAa 601_DVB  601_DVBa 601_DVB1 601_DVC  601_DVD  601_DVD1 601_DSE 601_DVE 601_DSE1 601_DVE1 "
-    "601_S6  601_S6a  601_S7   601_S8   601_S9   601_S9a "
-    "}",
-	"    1,      1,      1,      1,      1,       1,      "
-	"    2,      2,      2,      2,      2,       2,      2,      2,      2,"
-	"    2,      2,      2,      2,      2,       2,"
-	"    1,      1,      1,      1,      1,       1,      "
-	"    2,      2,      2,      2,      2,       2,       2,       2,       2,       2,       2,       2,"
-	"    2,      2,      2,      2,      2,       2"
-	);
-  /* Remember the size of the data vector. */
-  dtsize = Drv._dsize();
-
-  /* Description of the channels of the input vector. */
-  Urv = RV ( "{"
-	  "Tc"
-	  "495_offset"
-	  "495_VA  495_VB   495_VC   495_VD   495_VE   495_VF "
-	  "601_offset"
-	  "601_VA  601_VB   601_VC   601_VD   601_VE   601_SE "
-	  "}" );
-  /* Remember the size of the input vector. */
-  utsize = Urv._dsize();
-
-  /* Initialise the pointer to received data. */
-  p_rsp = NULL;
 }
 
