def construct_supervisor_command_line(supervisor_ip, cols, rows, area_size, traffic, road_cells, nodes, apn):
    """Creates the command to start up the supervisor.

    :type supervisor_ip: str
    :param supervisor_ip: the private IP address of supervisor
    :type cols: int
    :param cols: city cols
    :type rows: int
    :param rows: city rows
    :type area_size: int
    :param area_size: size of the area
    :type traffic: float
    :param traffic: traffic density
    :type road_cells: int
    :param road_cells: road cells
    :type nodes: int
    :param nodes: nodes number
    :type apn: int
    :param apn: areas per node
    :rtype: str
    :return: command line to start up the supervisor
    """
    command_line = [
        'java',
        '-Dakka.remote.netty.tcp.hostname=' + supervisor_ip,
        '-Dtrafficsimulation.warmup.seconds=20',
        '-Dtrafficsimulation.time.seconds=20',
        '-Dtrafficsimulation.city.cols=' + str(cols),
        '-Dtrafficsimulation.city.rows=' + str(rows),
        '-Dtrafficsimulation.area.size=' + str(area_size),
        '-Dtrafficsimulation.area.traffic_density=%.2f' % traffic,
        '-Dtrafficsimulation.area.cells_between_intersections=' + str(road_cells),
        '-Dworker.nodes=' + str(nodes),
        '-Dworker.areas_per_node=' + str(apn),
        '-Dakka.remote.log-remote-lifecycle-events=off',
        '-Dakka.loglevel=INFO',
        '-jar',
        '/home/ubuntu/supervisor.jar'
    ]
    return ' '.join(command_line)