Changeset 13933


Ignore:
Timestamp:
Nov 1, 2019 1:10:47 PM (11 days ago)
Author:
Christian Andersson
Message:

Specifically set phase angle to the same as in MSL 3.2.2. Related to ticket:5867

Location:
branches/dev-MSL323-MVD/Python/src/tests_jmodelica
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-MSL323-MVD/Python/src/tests_jmodelica/simulation/test_assimulo_interface_fmi.py

    r13924 r13933  
    14231423        opts["solver"] = "Radau5ODE"
    14241424       
     1425        model.set("sin2.phase", 1.57)
    14251426        res = model.simulate(final_time=1.5,options=opts)
    14261427       
     
    14371438        opts["CVode_options"]["linear_solver"] = "SPARSE"
    14381439       
     1440        model.set("sin2.phase", 1.57)
    14391441        res = model.simulate(final_time=1.5,options=opts)
    14401442       
     
    14491451        assert opts["with_jacobian"] == "Default"
    14501452       
     1453        model.set("sin2.phase", 1.57)
    14511454        res = model.simulate(final_time=1.5,options=opts)
    14521455        print res.final("J1.w")
     
    14561459        opts["with_jacobian"] = True
    14571460        model.reset()
    1458    
     1461       
     1462        model.set("sin2.phase", 1.57)
    14591463        res = model.simulate(final_time=1.5,options=opts)
    14601464        print res.final("J1.w")
     
    14641468        opts["CVode_options"]["usejac"] = False
    14651469        model.reset()
    1466    
     1470       
     1471        model.set("sin2.phase", 1.57)
    14671472        res = model.simulate(final_time=1.5,options=opts)
    14681473        print res.final("J1.w")
     
    14721477        opts["with_jacobian"] = False
    14731478        model.reset()
    1474    
     1479       
     1480        model.set("sin2.phase", 1.57)
    14751481        res = model.simulate(final_time=1.5,options=opts)
    14761482        print res.final("J1.w")
     
    15861592        opts["CVode_options"]["rtol"] = 1e-7
    15871593       
     1594        model.set("sin2.phase", 1.57)
    15881595        res = model.simulate(final_time=1.5,options=opts)
    15891596       
     
    16221629        opts["solver"] = "Radau5ODE"
    16231630       
     1631        model.set("sin2.phase", 1.57)
    16241632        res = model.simulate(final_time=1.5,options=opts)
    16251633       
     
    16321640        opts["solver"] = "Dopri5"
    16331641       
     1642        model.set("sin2.phase", 1.57)
    16341643        res = model.simulate(final_time=1.5,options=opts)
    16351644       
     
    16431652        opts["LSODAR_options"]["rtol"] = 1e-6
    16441653       
     1654        model.set("sin2.phase", 1.57)
    16451655        res = model.simulate(final_time=1.5,options=opts)
    16461656       
     
    16541664        opts["RodasODE_options"]["rtol"] = 1e-6
    16551665       
     1666        model.set("sin2.phase", 1.57)
    16561667        res = model.simulate(final_time=1.5,options=opts)
    16571668       
  • branches/dev-MSL323-MVD/Python/src/tests_jmodelica/test_fmi_coupled.py

    r13338 r13933  
    7373        model_cc_2 = load_fmu(Test_CoupledFMUModelME2.cc_name)
    7474       
     75        model_cc_1.set("sin2.phase", 1.57)
     76        model_cc_2.set("sin2.phase", 1.57)
     77       
    7578        models = [("First", model_cc_1), ("Second", model_cc_2)]
    7679        connections = []
     
    8285        nose.tools.assert_almost_equal(res.final("time"),1.5)
    8386        nose.tools.assert_almost_equal(res.final("First.J1.w"),res.final("Second.J1.w"))
    84         nose.tools.assert_almost_equal(res.final("First.J1.w"), 3.2501079, places=3)
     87        nose.tools.assert_almost_equal(res.final("First.J1.w"), 3.2501079, places=2)
    8588       
    8689        coupled.reset()
     
    9093        nose.tools.assert_almost_equal(res.final("time"),1.5)
    9194        nose.tools.assert_almost_equal(res.final("First.J1.w"),res.final("Second.J1.w"))
    92         nose.tools.assert_almost_equal(res.final("First.J1.w"), 3.2501079, places=3)
     95        nose.tools.assert_almost_equal(res.final("First.J1.w"), 3.2501079, places=2)
    9396
    9497    @testattr(stddist_full = True)
Note: See TracChangeset for help on using the changeset viewer.