Пример #1
0
def variables():
    domain = RNDomain(1)
    parameters = ParameterContainer(1, domain)
    state_input = InputStateVariables(n_states=2, m_inputs=1)
    null_vars = NullVariables()
    return null_vars, parameters, state_input
Пример #2
0
def param_vars():
    states = StateVariablesContainer(2)
    domain = RNDomain(1)
    parameters = ParameterContainer(1, domain)
    null_vars = NullVariables()
    return null_vars, parameters, states
Пример #3
0
def variables3():
    loc_vars = InputStateVariables(2, 1, time=Time(0., 2.))
    hl_vars = ParameterContainer(2, domain=RNDomain(1))
    return hl_vars, loc_vars
Пример #4
0
 def test_domain(self):
     Parameters(4, domain=RNDomain(4))
Пример #5
0
 def test_init_and_assertion(self):
     domain = RNDomain(4)
     params = Parameters(4, domain)
     domain.in_domain(params)
Пример #6
0
 def test_in_domain_random(self):
     domain = RNDomain(4)
     params = Parameters(4, domain)
     params.current_values = params.get_random_values()
     assert domain.in_domain(params)
Пример #7
0
 def test_init_and_assertion(self):
     domain = RNDomain(4)
     params = Parameters(4, domain)
     with pytest.raises(TypeError):
         domain.in_domain(params)