% Starting Algorithm: 
%	className: org.openda.algorithms.Dud
%	dir.: /home/verlaanm/tudelft/svn_costa/trunk/openda/tests/l21triad_two_twin/./algorithm
%	config.: dud.xml
%  Algorithm  configstring = dud.xml
% opening :/home/verlaanm/tudelft/svn_costa/trunk/openda/tests/l21triad_two_twin/./algorithm/dud.xml
%  Algorithm  Dud initialized
% Application initializing finished
% Initializing application
%  Algorithm  Dud preparation
%  Algorithm  Retrieving initial parameters from model
%  Algorithm  Starting optimizer
%  Algorithm  costFunction@class=org.openda.algorithms.SimulationKwadraticCostFunction
%  Algorithm  costFunction@weakParameterConstraint=false
%  Algorithm  costFunction@factor=0.5
% ========================================================================
% no1
%  swan-parameters: TRIAD.trfac, TRIAD.cutfr
evaluatedParameters{1}	=[0.05,2.5];
predicted{1}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.3366,1.6621,0.02581,2.0081,1.2385,1.5915,0.02517,2.0081,1.1647,1.5353,0.02315,2.0081,1.0781,1.4673,0.02161,2.0081,1.0196,1.3941,0.02115,2.0081,0.9919,1.3446];
observed{1}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.3361,1.6618,0.02587,2.0081,1.2144,1.5775,0.02532,2.0081,1.1136,1.5087,0.02339,2.0081,1.0216,1.4329,0.02193,2.0081,0.9645,1.3558,0.02149,2.0081,0.9398,1.3064];
residuals{1}	=[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,-4.999999999999449E-4,-2.9999999999996696E-4,6.0000000000001025E-5,0.0,-0.02410000000000001,-0.014000000000000012,1.4999999999999736E-4,0.0,-0.051100000000000145,-0.02660000000000018,2.4000000000000063E-4,0.0,-0.056499999999999995,-0.034399999999999986,3.2000000000000084E-4,0.0,-0.05510000000000004,-0.0383,3.4E-4,0.0,-0.052100000000000035,-0.03820000000000001];
obs_stdev{1}	=[0.0023210000345855954,0.2008100029923022,0.12787000190541148,0.16019000238701703,0.0022790000339597467,0.2008100029923022,0.12716000189483168,0.15964000237882137,0.0024220000360906124,0.2008100029923022,0.13361000199094417,0.16618000247627496,0.0025870000385493043,0.2008100029923022,0.121440001809597,0.15775000235065817,0.00253200003772974,0.2008100029923022,0.1113600016593933,0.15087000224813818,0.002339000034853816,0.2008100029923022,0.10216000152230263,0.1432900021351874,0.0021930000326782465,0.2008100029923022,0.096450001437217,0.13558000202029943,0.0021490000320225954,0.2008100029923022,0.09398000140041113,0.1306400019466877];
costObserved{1}	=0.756161106853533;
costTotal{1}	=0.756161106853533;
% SimulationKwadraticCostFunction: evaluation 1 : cost = 0.756
% Evaluating with parameters 
% swan-parameters - containing:
%    TRIAD.trfac= 0.055
%    TRIAD.cutfr= 2.5
% ========================================================================
% no2
%  swan-parameters: TRIAD.trfac, TRIAD.cutfr
evaluatedParameters{2}	=[0.05500000007450581,2.5];
predicted{2}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.3364,1.6619,0.02584,2.0081,1.2283,1.5843,0.02523,2.0081,1.1457,1.5239,0.02323,2.0081,1.0604,1.454,0.02173,2.0081,1.0023,1.3794,0.02128,2.0081,0.9756,1.3298];
observed{2}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.3361,1.6618,0.02587,2.0081,1.2144,1.5775,0.02532,2.0081,1.1136,1.5087,0.02339,2.0081,1.0216,1.4329,0.02193,2.0081,0.9645,1.3558,0.02149,2.0081,0.9398,1.3064];
residuals{2}	=[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,-2.9999999999996696E-4,-9.999999999998899E-5,3.0000000000002247E-5,0.0,-0.013900000000000023,-0.006800000000000139,8.99999999999998E-5,0.0,-0.03210000000000002,-0.015200000000000102,1.6000000000000042E-4,0.0,-0.038799999999999946,-0.021099999999999897,2.0000000000000226E-4,0.0,-0.037799999999999945,-0.023600000000000065,2.0999999999999838E-4,0.0,-0.035800000000000054,-0.023400000000000087];
obs_stdev{2}	=[0.0023210000345855954,0.2008100029923022,0.12787000190541148,0.16019000238701703,0.0022790000339597467,0.2008100029923022,0.12716000189483168,0.15964000237882137,0.0024220000360906124,0.2008100029923022,0.13361000199094417,0.16618000247627496,0.0025870000385493043,0.2008100029923022,0.121440001809597,0.15775000235065817,0.00253200003772974,0.2008100029923022,0.1113600016593933,0.15087000224813818,0.002339000034853816,0.2008100029923022,0.10216000152230263,0.1432900021351874,0.0021930000326782465,0.2008100029923022,0.096450001437217,0.13558000202029943,0.0021490000320225954,0.2008100029923022,0.09398000140041113,0.1306400019466877];
costObserved{2}	=0.32958290176094;
costTotal{2}	=0.32958290176094;
% SimulationKwadraticCostFunction: evaluation 2 : cost = 0.33
% Evaluating with parameters 
% swan-parameters - containing:
%    TRIAD.trfac= 0.05
%    TRIAD.cutfr= 2.75
% ========================================================================
% no3
%  swan-parameters: TRIAD.trfac, TRIAD.cutfr
evaluatedParameters{3}	=[0.05,2.7500000037252903];
predicted{3}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.3365,1.6621,0.02588,2.0081,1.2123,1.5821,0.02534,2.0081,1.1048,1.5117,0.02339,2.0081,1.0134,1.4366,0.02192,2.0081,0.9562,1.3599,0.02146,2.0081,0.9316,1.3109];
observed{3}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.3361,1.6618,0.02587,2.0081,1.2144,1.5775,0.02532,2.0081,1.1136,1.5087,0.02339,2.0081,1.0216,1.4329,0.02193,2.0081,0.9645,1.3558,0.02149,2.0081,0.9398,1.3064];
residuals{3}	=[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,-3.9999999999995595E-4,-2.9999999999996696E-4,-9.999999999999593E-6,0.0,0.0020999999999999908,-0.0046000000000001595,-2.0000000000002655E-5,0.0,0.008799999999999919,-0.0030000000000001137,0.0,0.0,0.008199999999999985,-0.0037000000000000366,1.0000000000003062E-5,0.0,0.008299999999999974,-0.004100000000000215,2.9999999999998778E-5,0.0,0.008199999999999985,-0.0044999999999999485];
obs_stdev{3}	=[0.0023210000345855954,0.2008100029923022,0.12787000190541148,0.16019000238701703,0.0022790000339597467,0.2008100029923022,0.12716000189483168,0.15964000237882137,0.0024220000360906124,0.2008100029923022,0.13361000199094417,0.16618000247627496,0.0025870000385493043,0.2008100029923022,0.121440001809597,0.15775000235065817,0.00253200003772974,0.2008100029923022,0.1113600016593933,0.15087000224813818,0.002339000034853816,0.2008100029923022,0.10216000152230263,0.1432900021351874,0.0021930000326782465,0.2008100029923022,0.096450001437217,0.13558000202029943,0.0021490000320225954,0.2008100029923022,0.09398000140041113,0.1306400019466877];
costObserved{3}	=0.016161753062430888;
costTotal{3}	=0.016161753062430888;
% SimulationKwadraticCostFunction: evaluation 3 : cost = 0.016
%  Algorithm  outerLoop@maxIterations=20
%  Algorithm  outerLoop@absTolerance=0.0010
%  Algorithm  outerLoop@relTolerance=0.0010
%  Algorithm  lineSearch@maxIterations=5
%  Algorithm  lineSearch@maxRelStepSize=10.0
%  Algorithm  lineSearch/backtracking@startIterationNegativeLook=3
%  Algorithm  lineSearch/backtracking@shorteningFactor=0.5
% Application initialized
% Application starting next step
% ======================================================
% DUD outer iteration no.1
% ======================================================
% -----------------------------------------------------
costs{1}	=[0.016161753062430888,0.32958290176094,0.756161106853533];
% -----------------------------------------------------
% Start search until improvement,
% Next try p=
%   swan-parameters - containing:
%      TRIAD.trfac= 0.057
%      TRIAD.cutfr= 2.622
%   delta_p= 
%   swan-parameters - containing:
%      TRIAD.trfac= 6.784E-3
%      TRIAD.cutfr= -0.128
% ========================================================================
% no4
%  swan-parameters: TRIAD.trfac, TRIAD.cutfr
evaluatedParameters{4}	=[0.05678388095234188,2.6220014726287983];
predicted{4}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.3361,1.6618,0.02588,2.0081,1.2118,1.5777,0.02532,2.0081,1.1118,1.5092,0.02339,2.0081,1.0201,1.4334,0.02193,2.0081,0.963,1.3562,0.02149,2.0081,0.9382,1.3069];
observed{4}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.3361,1.6618,0.02587,2.0081,1.2144,1.5775,0.02532,2.0081,1.1136,1.5087,0.02339,2.0081,1.0216,1.4329,0.02193,2.0081,0.9645,1.3558,0.02149,2.0081,0.9398,1.3064];
residuals{4}	=[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,-9.999999999999593E-6,0.0,0.0025999999999999357,-2.0000000000020002E-4,0.0,0.0,0.0018000000000000238,-5.00000000000167E-4,0.0,0.0,0.0015000000000000568,-4.999999999999449E-4,0.0,0.0,0.0015000000000000568,-4.00000000000178E-4,0.0,0.0,0.0015999999999999348,-4.999999999999449E-4];
obs_stdev{4}	=[0.0023210000345855954,0.2008100029923022,0.12787000190541148,0.16019000238701703,0.0022790000339597467,0.2008100029923022,0.12716000189483168,0.15964000237882137,0.0024220000360906124,0.2008100029923022,0.13361000199094417,0.16618000247627496,0.0025870000385493043,0.2008100029923022,0.121440001809597,0.15775000235065817,0.00253200003772974,0.2008100029923022,0.1113600016593933,0.15087000224813818,0.002339000034853816,0.2008100029923022,0.10216000152230263,0.1432900021351874,0.0021930000326782465,0.2008100029923022,0.096450001437217,0.13558000202029943,0.0021490000320225954,0.2008100029923022,0.09398000140041113,0.1306400019466877];
costObserved{4}	=7.650039529526301E-4;
costTotal{4}	=7.650039529526301E-4;
% SimulationKwadraticCostFunction: evaluation 4 : cost = 7.65E-4
% Error estimate for this outer iteration
%  swan-parameters: TRIAD.trfac, TRIAD.cutfr
parameterErrorEstimateStd{1}	=[0.06142718938279845,0.9548084638000656];
parameterErrorCorrelations{1}	=[0.9999999999999998,-0.9812081833412896;-0.981208183341289,1.0000000000000002];
% Application starting next step
% ======================================================
% DUD outer iteration no.2
% ======================================================
% -----------------------------------------------------
costs{2}	=[7.650039529526301E-4,0.016161753062430888,0.32958290176094];
% -----------------------------------------------------
% Start search until improvement,
% Next try p=
%   swan-parameters - containing:
%      TRIAD.trfac= 0.058
%      TRIAD.cutfr= 2.602
%   delta_p= 
%   swan-parameters - containing:
%      TRIAD.trfac= 8.992E-4
%      TRIAD.cutfr= -0.02
% ========================================================================
% no5
%  swan-parameters: TRIAD.trfac, TRIAD.cutfr
evaluatedParameters{5}	=[0.05768311076364626,2.6021183110208637];
predicted{5}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.3361,1.6618,0.02587,2.0081,1.215,1.5779,0.02532,2.0081,1.1143,1.5093,0.02338,2.0081,1.0224,1.4336,0.02192,2.0081,0.9653,1.3566,0.02148,2.0081,0.9405,1.3072];
observed{5}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.3361,1.6618,0.02587,2.0081,1.2144,1.5775,0.02532,2.0081,1.1136,1.5087,0.02339,2.0081,1.0216,1.4329,0.02193,2.0081,0.9645,1.3558,0.02149,2.0081,0.9398,1.3064];
residuals{5}	=[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,-6.00000000000156E-4,-4.00000000000178E-4,0.0,0.0,-7.00000000000145E-4,-6.00000000000156E-4,9.999999999999593E-6,0.0,-7.999999999999119E-4,-6.999999999999229E-4,1.0000000000003062E-5,0.0,-8.000000000000229E-4,-8.000000000001339E-4,9.999999999999593E-6,0.0,-7.000000000000339E-4,-7.999999999999119E-4];
obs_stdev{5}	=[0.0023210000345855954,0.2008100029923022,0.12787000190541148,0.16019000238701703,0.0022790000339597467,0.2008100029923022,0.12716000189483168,0.15964000237882137,0.0024220000360906124,0.2008100029923022,0.13361000199094417,0.16618000247627496,0.0025870000385493043,0.2008100029923022,0.121440001809597,0.15775000235065817,0.00253200003772974,0.2008100029923022,0.1113600016593933,0.15087000224813818,0.002339000034853816,0.2008100029923022,0.10216000152230263,0.1432900021351874,0.0021930000326782465,0.2008100029923022,0.096450001437217,0.13558000202029943,0.0021490000320225954,0.2008100029923022,0.09398000140041113,0.1306400019466877];
costObserved{5}	=2.143372785981993E-4;
costTotal{5}	=2.143372785981993E-4;
% SimulationKwadraticCostFunction: evaluation 5 : cost = 2.143E-4
% Error estimate for this outer iteration
%  swan-parameters: TRIAD.trfac, TRIAD.cutfr
parameterErrorEstimateStd{2}	=[0.06438509949769912,1.0549084017708288];
parameterErrorCorrelations{2}	=[0.9999999999999998,-0.985428000652417;-0.985428000652417,1.0];
% ===================================================================
% SimulationKwadraticCostfunction: optimal results
%     number of evaluations: 5
%     all cost values:
%         [0.756,0.33,0.016,7.65E-4,2.143E-4]
%     all parameter values
%         [0.05,0.055,0.05,0.057,0.058;2.5,2.5,2.75,2.622,2.602]
%     number of observations: 32
%     best cost:
%         cost = 2.143E-4
%     best parameters:
%         
%        swan-parameters - containing:
%           TRIAD.trfac= 0.058
%           TRIAD.cutfr= 2.602
% ===================================================================
% Application Done
