% 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.336,1.6617,0.02595,2.0081,1.1839,1.5652,0.02546,2.0081,1.0659,1.4881,0.02359,2.0081,0.9712,1.4077,0.02218,2.0081,0.9162,1.3286,0.02174,2.0081,0.8937,1.2799];
residuals{1}	=[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,-5.999999999999339E-4,-3.9999999999995595E-4,1.4000000000000123E-4,0.0,-0.05459999999999998,-0.02629999999999999,2.899999999999986E-4,0.0,-0.0988,-0.04720000000000013,4.399999999999994E-4,0.0,-0.1069000000000001,-0.0596000000000001,5.699999999999976E-4,0.0,-0.10340000000000005,-0.06549999999999989,5.900000000000002E-4,0.0,-0.09819999999999995,-0.06469999999999998];
obs_stdev{1}	=[0.0023210000345855954,0.2008100029923022,0.12787000190541148,0.16019000238701703,0.0022790000339597467,0.2008100029923022,0.12716000189483168,0.15964000237882137,0.0024220000360906124,0.2008100029923022,0.13360000199079514,0.16617000247612596,0.0025950000386685134,0.2008100029923022,0.11839000176414848,0.15652000233232974,0.0025460000379383565,0.2008100029923022,0.10659000158831478,0.14881000221744178,0.0023590000351518393,0.2008100029923022,0.09712000144720077,0.14077000209763646,0.0022180000330507756,0.2008100029923022,0.0916200013652444,0.13286000197976827,0.0021740000323951245,0.2008100029923022,0.08937000133171678,0.1279900019071996];
costObserved{1}	=2.8807669164145735;
costTotal{1}	=2.8807669164145735;
% SimulationKwadraticCostFunction: evaluation 1 : cost = 2.881
% 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.336,1.6617,0.02595,2.0081,1.1839,1.5652,0.02546,2.0081,1.0659,1.4881,0.02359,2.0081,0.9712,1.4077,0.02218,2.0081,0.9162,1.3286,0.02174,2.0081,0.8937,1.2799];
residuals{2}	=[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,-3.9999999999995595E-4,-1.9999999999997797E-4,1.1000000000000246E-4,0.0,-0.044399999999999995,-0.019100000000000117,2.3000000000000104E-4,0.0,-0.07979999999999987,-0.035800000000000054,3.599999999999992E-4,0.0,-0.08920000000000006,-0.04630000000000001,4.49999999999999E-4,0.0,-0.08609999999999995,-0.050799999999999956,4.599999999999986E-4,0.0,-0.08189999999999997,-0.049900000000000055];
obs_stdev{2}	=[0.0023210000345855954,0.2008100029923022,0.12787000190541148,0.16019000238701703,0.0022790000339597467,0.2008100029923022,0.12716000189483168,0.15964000237882137,0.0024220000360906124,0.2008100029923022,0.13360000199079514,0.16617000247612596,0.0025950000386685134,0.2008100029923022,0.11839000176414848,0.15652000233232974,0.0025460000379383565,0.2008100029923022,0.10659000158831478,0.14881000221744178,0.0023590000351518393,0.2008100029923022,0.09712000144720077,0.14077000209763646,0.0022180000330507756,0.2008100029923022,0.0916200013652444,0.13286000197976827,0.0021740000323951245,0.2008100029923022,0.08937000133171678,0.1279900019071996];
costObserved{2}	=1.9329912178140969;
costTotal{2}	=1.9329912178140969;
% SimulationKwadraticCostFunction: evaluation 2 : cost = 1.933
% 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.336,1.6617,0.02595,2.0081,1.1839,1.5652,0.02546,2.0081,1.0659,1.4881,0.02359,2.0081,0.9712,1.4077,0.02218,2.0081,0.9162,1.3286,0.02174,2.0081,0.8937,1.2799];
residuals{3}	=[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,-4.999999999999449E-4,-3.9999999999995595E-4,7.000000000000062E-5,0.0,-0.02839999999999998,-0.016900000000000137,1.1999999999999858E-4,0.0,-0.038899999999999935,-0.023600000000000065,1.999999999999988E-4,0.0,-0.042200000000000126,-0.028900000000000148,2.599999999999998E-4,0.0,-0.040000000000000036,-0.031300000000000106,2.79999999999999E-4,0.0,-0.037899999999999934,-0.030999999999999917];
obs_stdev{3}	=[0.0023210000345855954,0.2008100029923022,0.12787000190541148,0.16019000238701703,0.0022790000339597467,0.2008100029923022,0.12716000189483168,0.15964000237882137,0.0024220000360906124,0.2008100029923022,0.13360000199079514,0.16617000247612596,0.0025950000386685134,0.2008100029923022,0.11839000176414848,0.15652000233232974,0.0025460000379383565,0.2008100029923022,0.10659000158831478,0.14881000221744178,0.0023590000351518393,0.2008100029923022,0.09712000144720077,0.14077000209763646,0.0022180000330507756,0.2008100029923022,0.0916200013652444,0.13286000197976827,0.0021740000323951245,0.2008100029923022,0.08937000133171678,0.1279900019071996];
costObserved{3}	=0.49179742149448497;
costTotal{3}	=0.49179742149448497;
% SimulationKwadraticCostFunction: evaluation 3 : cost = 0.492
%  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.49179742149448497,1.9329912178140969,2.8807669164145735];
% -----------------------------------------------------
% Start search until improvement,
% Next try p=
%   swan-parameters - containing:
%      TRIAD.trfac= 0.06
%      TRIAD.cutfr= 2.775
%   delta_p= 
%   swan-parameters - containing:
%      TRIAD.trfac= 9.708E-3
%      TRIAD.cutfr= 0.025
% ========================================================================
% no4
%  swan-parameters: TRIAD.trfac, TRIAD.cutfr
evaluatedParameters{4}	=[0.05970804442424326,2.7747653327801154];
predicted{4}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.336,1.6617,0.02594,2.0081,1.1876,1.5665,0.02545,2.0081,1.0706,1.49,0.02358,2.0081,0.9754,1.4097,0.02216,2.0081,0.9201,1.3308,0.02172,2.0081,0.8975,1.2821];
observed{4}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.336,1.6617,0.02595,2.0081,1.1839,1.5652,0.02546,2.0081,1.0659,1.4881,0.02359,2.0081,0.9712,1.4077,0.02218,2.0081,0.9162,1.3286,0.02174,2.0081,0.8937,1.2799];
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.0037000000000000366,-0.0013000000000000789,9.999999999999593E-6,0.0,-0.0046999999999999265,-0.0019000000000000128,9.999999999999593E-6,0.0,-0.0042000000000000925,-0.0020000000000000018,1.9999999999999185E-5,0.0,-0.0039000000000000146,-0.0021999999999999797,1.9999999999999185E-5,0.0,-0.0037999999999999146,-0.0021999999999999797];
obs_stdev{4}	=[0.0023210000345855954,0.2008100029923022,0.12787000190541148,0.16019000238701703,0.0022790000339597467,0.2008100029923022,0.12716000189483168,0.15964000237882137,0.0024220000360906124,0.2008100029923022,0.13360000199079514,0.16617000247612596,0.0025950000386685134,0.2008100029923022,0.11839000176414848,0.15652000233232974,0.0025460000379383565,0.2008100029923022,0.10659000158831478,0.14881000221744178,0.0023590000351518393,0.2008100029923022,0.09712000144720077,0.14077000209763646,0.0022180000330507756,0.2008100029923022,0.0916200013652444,0.13286000197976827,0.0021740000323951245,0.2008100029923022,0.08937000133171678,0.1279900019071996];
costObserved{4}	=0.004814396242853358;
costTotal{4}	=0.004814396242853358;
% SimulationKwadraticCostFunction: evaluation 4 : cost = 4.814E-3
% Error estimate for this outer iteration
%  swan-parameters: TRIAD.trfac, TRIAD.cutfr
parameterErrorEstimateStd{1}	=[0.060071077264471445,0.9287859948457594];
parameterErrorCorrelations{1}	=[1.0000000000000002,-0.9818117651505509;-0.9818117651505509,0.9999999999999998];
% Application starting next step
% ======================================================
% DUD outer iteration no.2
% ======================================================
% -----------------------------------------------------
costs{2}	=[0.004814396242853358,0.49179742149448497,1.9329912178140969];
% -----------------------------------------------------
% Start search until improvement,
% Next try p=
%   swan-parameters - containing:
%      TRIAD.trfac= 0.06
%      TRIAD.cutfr= 2.785
%   delta_p= 
%   swan-parameters - containing:
%      TRIAD.trfac= 5.073E-4
%      TRIAD.cutfr= 0.01
% ========================================================================
% no5
%  swan-parameters: TRIAD.trfac, TRIAD.cutfr
evaluatedParameters{5}	=[0.06021531375762928,2.785227331957324];
predicted{5}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.3359,1.6617,0.02595,2.0081,1.1855,1.5655,0.02546,2.0081,1.0675,1.4884,0.02359,2.0081,0.9724,1.408,0.02217,2.0081,0.9173,1.3289,0.02174,2.0081,0.8948,1.2803];
observed{5}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.336,1.6617,0.02595,2.0081,1.1839,1.5652,0.02546,2.0081,1.0659,1.4881,0.02359,2.0081,0.9712,1.4077,0.02218,2.0081,0.9162,1.3286,0.02174,2.0081,0.8937,1.2799];
residuals{5}	=[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,9.999999999998899E-5,0.0,0.0,0.0,-0.0016000000000000458,-2.9999999999996696E-4,0.0,0.0,-0.0015999999999998238,-2.9999999999996696E-4,0.0,0.0,-0.0012000000000000899,-2.9999999999996696E-4,9.999999999999593E-6,0.0,-0.0010999999999999899,-2.9999999999996696E-4,0.0,0.0,-0.0010999999999999899,-3.9999999999995595E-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.13360000199079514,0.16617000247612596,0.0025950000386685134,0.2008100029923022,0.11839000176414848,0.15652000233232974,0.0025460000379383565,0.2008100029923022,0.10659000158831478,0.14881000221744178,0.0023590000351518393,0.2008100029923022,0.09712000144720077,0.14077000209763646,0.0022180000330507756,0.2008100029923022,0.0916200013652444,0.13286000197976827,0.0021740000323951245,0.2008100029923022,0.08937000133171678,0.1279900019071996];
costObserved{5}	=4.521562478169508E-4;
costTotal{5}	=4.521562478169508E-4;
% SimulationKwadraticCostFunction: evaluation 5 : cost = 4.522E-4
% Error estimate for this outer iteration
%  swan-parameters: TRIAD.trfac, TRIAD.cutfr
parameterErrorEstimateStd{2}	=[0.060034589518179395,0.8595105060091037];
parameterErrorCorrelations{2}	=[1.0,-0.9772333681954721;-0.9772333681954725,0.9999999999999999];
% Application starting next step
% ======================================================
% DUD outer iteration no.3
% ======================================================
% -----------------------------------------------------
costs{3}	=[4.521562478169508E-4,0.004814396242853358,0.49179742149448497];
% -----------------------------------------------------
% Start search until improvement,
% Next try p=
%   swan-parameters - containing:
%      TRIAD.trfac= 0.06
%      TRIAD.cutfr= 2.794
%   delta_p= 
%   swan-parameters - containing:
%      TRIAD.trfac= 6.816E-5
%      TRIAD.cutfr= 8.899E-3
% ========================================================================
% no6
%  swan-parameters: TRIAD.trfac, TRIAD.cutfr
evaluatedParameters{6}	=[0.06028347868981291,2.7941264464124806];
predicted{6}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.3359,1.6617,0.02595,2.0081,1.1848,1.5652,0.02546,2.0081,1.0666,1.488,0.02359,2.0081,0.9713,1.4074,0.02218,2.0081,0.9162,1.3282,0.02174,2.0081,0.8937,1.2795];
observed{6}	=[0.02321,2.0081,1.2787,1.6019,0.02279,2.0081,1.2716,1.5964,0.02422,2.0081,1.336,1.6617,0.02595,2.0081,1.1839,1.5652,0.02546,2.0081,1.0659,1.4881,0.02359,2.0081,0.9712,1.4077,0.02218,2.0081,0.9162,1.3286,0.02174,2.0081,0.8937,1.2799];
residuals{6}	=[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,9.999999999998899E-5,0.0,0.0,0.0,-9.000000000001229E-4,0.0,0.0,0.0,-6.999999999999229E-4,9.999999999998899E-5,0.0,0.0,-1.0000000000010001E-4,2.9999999999996696E-4,0.0,0.0,0.0,3.9999999999995595E-4,0.0,0.0,0.0,3.9999999999995595E-4];
obs_stdev{6}	=[0.0023210000345855954,0.2008100029923022,0.12787000190541148,0.16019000238701703,0.0022790000339597467,0.2008100029923022,0.12716000189483168,0.15964000237882137,0.0024220000360906124,0.2008100029923022,0.13360000199079514,0.16617000247612596,0.0025950000386685134,0.2008100029923022,0.11839000176414848,0.15652000233232974,0.0025460000379383565,0.2008100029923022,0.10659000158831478,0.14881000221744178,0.0023590000351518393,0.2008100029923022,0.09712000144720077,0.14077000209763646,0.0022180000330507756,0.2008100029923022,0.0916200013652444,0.13286000197976827,0.0021740000323951245,0.2008100029923022,0.08937000133171678,0.1279900019071996];
costObserved{6}	=6.318191975288879E-5;
costTotal{6}	=6.318191975288879E-5;
% SimulationKwadraticCostFunction: evaluation 6 : cost = 6.318E-5
% Error estimate for this outer iteration
%  swan-parameters: TRIAD.trfac, TRIAD.cutfr
parameterErrorEstimateStd{3}	=[0.030137123983138434,1.0037790733528438];
parameterErrorCorrelations{3}	=[0.9999999999999999,-0.9227681867481031;-0.922768186748101,1.0];
% ===================================================================
% SimulationKwadraticCostfunction: optimal results
%     number of evaluations: 6
%     all cost values:
%         [2.881,1.933,0.492,4.814E-3,4.522E-4,6.318E-5]
%     all parameter values
%         [0.05,0.055,0.05,0.06,0.06,0.06;2.5,2.5,2.75,2.775,2.785,2.794]
%     number of observations: 32
%     best cost:
%         cost = 6.318E-5
%     best parameters:
%         
%        swan-parameters - containing:
%           TRIAD.trfac= 0.06
%           TRIAD.cutfr= 2.794
% ===================================================================
% Application Done
