xjiang4 / ellipsoids

Automatically exported from code.google.com/p/ellipsoids
Other
0 stars 1 forks source link

Investigate the 'inftraj2d' configuration problems and make it pass all tests #125

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The config 'inftraj2d' has the constant A matrix with eigenvalues 1 and -1. 
There are two good dir vectors which have the property:

norm(ltGoodDir{1}(t) + ltGoodDir{2}(t)) -> 0 while increasing t. So 

ltGoodDir{1}(t) ~ -ltGoodDir{2}(t).

That's why for t1=10 the QArray is ill-conditioned.

The problem is that this config doesn't pass regression test for t1 = 10. The 
cache update is not an option because the result, produced by one machine can 
greatly differ from the result, produced by another machine. Moreover as it 
have symmetric matrix A it must pass the 'transpose test' on the same machine:

In AGoodDirs the changing of lines:

self.XstTransDynamics = matOpFactory.transpose(XstDynamics)
self.RstTransDynamics = matOpFactory.transpose(RstDynamics)

to

self.XstTransDynamics = XstDynamics
self.RstTransDynamics = RstDynamics

must not affect the regression test result. Now this test isn't passed.

So we need:

1) Investigate the reasons of 'transpose test' failure;
2) Find a method to increase precision of calculations for 'inftraj2d';
3) Find a method for ill-conditioned ellipsoids QArray and TouchCurve 
comparison;

The config 'inftraj2d' must pass all tests on server and user's machine with 
the same cache file and time t1=10.

Original issue reported on code.google.com by swige.ide on 25 Jun 2013 at 11:18

GoogleCodeExporter commented 8 years ago
The original config can be found in r2022. It have only calcPrecision changed.

Original comment by swige.ide on 25 Jun 2013 at 11:24

GoogleCodeExporter commented 8 years ago
'inftraj2d' config: the system (sysdef) XML:

<?xml version="1.0"?>
<root version="2" xml_tb_version="2.0" type="struct" >
<valueObj type="struct" >
    <dim type="cell" >
        <item type="double" >2</item>
    </dim>
    <At type="cell" size="2 1">
        <item type="char" >0 1</item>
        <item type="char" >1 0</item>
    </At>
    <Bt type="cell" size="2 1">
        <item type="char" >1 0</item>
        <item type="char" >0 1</item>
    </Bt>
    <initial_set type="struct" >
        <Q type="cell" size="2 1">
            <item type="double" >1 0</item>
            <item type="double" >0 1</item>
        </Q>
        <a type="double" size="2 1">0 0</a>
    </initial_set>
    <control_restriction type="struct" >
        <Q type="cell" size="2 1">
            <item type="char" >1 0</item>
            <item type="char" >0 1</item>
        </Q>
        <a type="cell" size="2 1">
            <item type="char" >0</item>
            <item type="char" >0</item>
        </a>
    </control_restriction>
    <time_interval type="struct" >
        <t0 type="cell" >
            <item type="double" >0</item>
        </t0>
        <t1 type="cell" >
            <item type="double" >10</item>
        </t1>
    </time_interval>
    <description type="char" > </description>
    <disturbance_restriction type="struct" >
        <Q type="cell" size="2 1">
            <item type="char" >0 0</item>
            <item type="char" >0 0</item>
        </Q>
        <a type="cell" size="2 1">
            <item type="char" >0</item>
            <item type="char" >0</item>
        </a>
    </disturbance_restriction>
    <Ct type="cell" size="2 1">
        <item type="char" >0 0</item>
        <item type="char" >0 0</item>
    </Ct>
</valueObj>
<keyStr type="char" >inftraj2d</keyStr>
</root>

The config XML:

<?xml version="1.0"?>
<root version="19" xml_tb_version="2.0" type="struct" >
<valueObj type="struct" >
    <genericProps type="struct" >
        <calcTimeLimVec type="double" >0 10</calcTimeLimVec>
        <calcPrecision type="double" >0.00025</calcPrecision>
        <isSplineForMatrixCalcUsed type="boolean" >1</isSplineForMatrixCalcUsed>
    </genericProps>
    <projectionProps type="struct" >
        <projSpaceSetName type="char" >set1</projSpaceSetName>
        <projSpaceSets type="struct" >
            <set1 type="cell" >
                <item type="boolean" >1 1</item>
            </set1>
        </projSpaceSets>
        <isDynamicProjEnabled type="boolean" >1</isDynamicProjEnabled>
        <isStaticProjEnabled type="boolean" >1</isStaticProjEnabled>
    </projectionProps>
    <goodDirSelection type="struct" >
        <methodName type="char" >manual</methodName>
        <methodProps type="struct" >
            <manual type="struct" >
                <lsGoodDirSetName type="char" >set1</lsGoodDirSetName>
                <lsGoodDirSets type="struct" >
                    <set1 type="cell" >
                        <item type="double" >1 0</item>
                        <item type="double" >0 1</item>
                    </set1>
                </lsGoodDirSets>
            </manual>
            <auto type="struct" >
                <nGoodDirs type="double" >1</nGoodDirs>
                <goodDirSpaceVec type="boolean" >1 1</goodDirSpaceVec>
            </auto>
        </methodProps>
        <selectionTime type="double" >0</selectionTime>
    </goodDirSelection>
    <customResultDir type="struct" >
        <isEnabled type="boolean" >0</isEnabled>
        <dirName type="char" >C:/SVN_Local/_GrasResults</dirName>
    </customResultDir>
    <logging type="struct" >
        <log4jSettings type="char" >
                log4j.rootLogger=INFO, stdout, A1
                #
                log4j.appender.stdout=org.apache.log4j.ConsoleAppender
                log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
                #
                log4j.appender.stdout.layout.ConversionPattern=%5p %c - %m\n
                #
                log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
                #
                #do not change - name of the main log file should have a 
                #fixed pattern so that email logger can pick it up
                log4j.appender.A1.File=${gras.ellapx.uncertcalc.log4j.logfile.dirwithsep}${gras.ellapx.uncertcalc.log4j.logfile.main.name}
                #
                log4j.appender.A1.layout=org.apache.log4j.PatternLayout
                log4j.appender.A1.layout.ConversionPattern=%d %5p %c - %m%n
            </log4jSettings>
    </logging>
    <plottingProps type="struct" >
        <isEnabled type="boolean" >1</isEnabled>
        <viewAngleVec type="double" >37.5 30</viewAngleVec>
        <isGoodCurvesSeparately type="boolean" >1</isGoodCurvesSeparately>
    </plottingProps>
    <ellipsoidalApxProps type="struct" >
        <internalApx type="struct" >
            <isEnabled type="boolean" >1</isEnabled>
            <schemas type="struct" >
                <noUncertSqrtQ type="struct" >
                    <isEnabled type="boolean" >1</isEnabled>
                    <props type="struct" >
                        <selectionMethodForSMatrix type="char" >volume</selectionMethodForSMatrix>
                    </props>
                </noUncertSqrtQ>
                <noUncertJustQ type="struct" >
                    <isEnabled type="boolean" >0</isEnabled>
                    <props type="struct" >
                        <selectionMethodForSMatrix type="char" >volume</selectionMethodForSMatrix>
                    </props>
                </noUncertJustQ>
            </schemas>
            <dispScaleFactor type="double" >0.97</dispScaleFactor>
        </internalApx>
        <externalApx type="struct" >
            <isEnabled type="boolean" >1</isEnabled>
            <schemas type="struct" >
                <justQ type="struct" >
                    <isEnabled type="boolean" >1</isEnabled>
                </justQ>
            </schemas>
            <dispScaleFactor type="double" >1.01</dispScaleFactor>
        </externalApx>
        <extIntApx type="struct" >
            <isEnabled type="boolean" >0</isEnabled>
            <schemas type="struct" >
                <uncert type="struct" >
                    <isEnabled type="boolean" >0</isEnabled>
                    <props type="struct" >
                        <selectionMethodForSMatrix type="char" >volume</selectionMethodForSMatrix>
                        <minQSqrtMatEig type="double" >0.1</minQSqrtMatEig>
                    </props>
                </uncert>
            </schemas>
        </extIntApx>
    </ellipsoidalApxProps>
    <systemDefinitionConfName type="char" >inftraj2d</systemDefinitionConfName>
    <regularizationProps type="struct" >
        <isEnabled type="boolean" >0</isEnabled>
        <isJustCheck type="boolean" >0</isJustCheck>
        <regTol type="double" >1e-05</regTol>
    </regularizationProps>
</valueObj>
<keyStr type="char" >inftraj2d</keyStr>
</root>

Original comment by swige.ide on 26 Jun 2013 at 2:33