예제 #1
0
파일: Ackley.py 프로젝트: flab-coder/flopt
def create_variables(n):
    variables = [
        Variable(name=f'x{i}',
                 lowBound=-32.768,
                 upBound=32.768,
                 cat='Continuous') for i in range(n)
    ]
    return variables
예제 #2
0
def create_variables(*args, **kwargs):
    variables = [
        Variable(
            name=f'x{i}',
            lowBound=-20,
            upBound=20,
            cat='Continuous'
        )
        for i in [0, 1]
    ]
    return variables
예제 #3
0
def create_variables(n):
    variables = [Variable(name=f'x{i}', cat='Continuous') for i in range(n)]
    return variables
예제 #4
0
def create_variables(*args, **kwargs):
    variables = [
        Variable(name=f'x1', lowBound=-15, upBound=-5, cat='Continuous'),
        Variable(name=f'x2', lowBound=-3, upBound=3, cat='Continuous')
    ]
    return variables
예제 #5
0
def create_variables(n):
    variables = [
        Variable(name=f'x{i}', lowBound=0, upBound=pi, cat='Continuous')
        for i in range(2)
    ]
    return variables
예제 #6
0
def create_variables(*args, **kwargs):
    variables = [
        Variable(name=f'x{i}', lowBound=-5.12, upBound=5.12, cat='Continuous')
        for i in range(5)
    ]
    return variables