示例#1
0
pesos = [[10**-4, 10**-1], [10**-5, 10**-1], [10**-6,
                                              10**-1], [10**-7, 10**-1],
         [10**-8, 10**-1], [10**-4, 10**-2], [10**-5, 10**-2],
         [10**-6, 10**-2], [10**-7, 10**-2], [10**-8, 10**-2]]

input = input01.input()
META_ACO = aco.AcoStaffing(staff=input.staff,
                           skill=input.skill,
                           task=input.task,
                           staff_skill=input.staff_skill,
                           task_skill=input.task_skill,
                           task_precedent=input.task_precedent,
                           mind_strategy=input.mind_strategy)

log.COUNTER_TIME = 1
log.debug_timer("Empezando seguimiento...")

META_ACO.config(ants=20,
                alpha=3,
                beta=1,
                rho=0.5,
                tau=0.4,
                quu=0.5,
                generation=200)
history = []
history_iter = []
max_total = []
fit_max = 0

for e in pesos:
    fit_iter = 0
示例#2
0
import numpy as np
from alglib.meta import aco
from alglib.help import log
import input01

input = input01.input()
META_ACO = aco.AcoStaffing(staff=input.staff,
                           skill=input.skill,
                           task=input.task,
                           staff_skill=input.staff_skill,
                           task_skill=input.task_skill,
                           task_precedent=input.task_precedent,
                           mind_strategy=input.mind_strategy)

log.COUNTER_TIME = 1
log.debug_timer("Empezando seguimiento...")

META_ACO.config(ants=20,
                alpha=3,
                beta=1,
                rho=0.5,
                tau=0.4,
                quu=0.5,
                generation=250,
                is_normalize=False,
                is_stress=True)
META_ACO.weight_config(wcost=0.5, wdur=0.5)

history = []

print(40 * "-")