Example #1
0
   'roll': 0.1,
   'stationary': False,
   'loss': 0.1,
   'power_density': 140,
   'tacking': 0,
   'tech': 'csi',
   'tilt': 0},
  'wind': {'power_coef': 0.3,
   'thurse_coef': 0.6,
   'v_in': 2,
   'v_off': 45,
   'v_rate': 15}}}



task = Task(test_mission, test_ship, power_consumption_list)



def test_constraint_mixed_objective_optimisation():
    con_mix_opt = Constraint_mixed_objective_optimisation(task, config=config)
    mix_opt = Mixed_objective_optimization_function(task, config=config)
    champion, champion_x = con_mix_opt.run()
    for opt_x, constraint_x in zip(champion_x, mix_opt.constraints()):
        assert opt_x <= constraint_x

def test_constraint_mixed_objective_optimisation_island():
    con_mix_opt = Constraint_mixed_objective_optimisation(task, config=config)
    mix_opt = Mixed_objective_optimization_function(task, config=config)
    champion, champion_x = con_mix_opt.island_run()
    for opt_x, constraint_x in zip(champion_x, mix_opt.constraints()):
Example #2
0
    'sonar': {
        'power': [0.5, 50],
        'duty_cycle': 0.5
    },
    'ph_sensor': {
        'power': [0.08, 0.1],
        'duty_cycle': 0.95
    },
    'temp_sensor': {
        'power': [0.04],
        'duty_cycle': 1
    },
    'wind_sensor': {
        'power': [0.67, 1.1],
        'duty_cycle': 0.5
    },
    'servo_motors': {
        'power': [0.4, 1.35],
        'duty_cycle': 0.5
    },
    'radio_transmitter': {
        'power': [0.5, 20],
        'duty_cycle': 0.2
    }
}

test_mission = Mission('2014-01-01', test_route, 2)
test_task = Task(test_mission, test_ship, power_consumption_list)

test_task.estimate_demand_load()
Example #3
0
test_ship.dimension(5.72, 0.248, 0.76, 1.2, 5.72/(0.549)**(1/3),0.613)

power_consumption_list = {'single_board_computer': {'power': [2, 10], 'duty_cycle': 0.5},
                              'webcam': {'power': [0.6], 'duty_cycle': 1},
                              'gps': {'power': [0.04, 0.4], 'duty_cycle': 0.9},
                              'imu': {'power': [0.67, 1.1], 'duty_cycle': 0.9},
                              'sonar': {'power': [0.5, 50, 0.2], 'duty_cycle': 0.5},
                              'ph_sensor': {'power': [0.08, 0.1], 'duty_cycle': 0.95},
                              'temp_sensor': {'power': [0.04], 'duty_cycle': 1},
                              'wind_sensor': {'power': [0.67, 1.1], 'duty_cycle': 0.5},
                              'servo_motors': {'power': [0.4, 1.35], 'duty_cycle': 0.5},

                              'radio_transmitter': {'power': [0.5, 20], 'duty_cycle': 0.2}}

test_mission = Mission('2014-01-01', test_route, 2)
test_task = Task(test_mission, test_ship, power_consumption_list)

test_task.get_hotel_load()
test_task.get_load_demand()
# h_normal = HotelLoad(test_mission, power_consumption_list)
# h_full =  HotelLoad(test_mission, power_consumption_list, 'full-power')
#
#
# test_mission = Mission('2014-01-01', test_route, 2, test_ship, power_consumption_list)
#
#
#
# def test_hotel_load():
#     ts_normal = h_normal.generate_power_consumption_timeseries()
#     ts_full =h_full.generate_power_consumption_timeseries()
#