com2014-template/model/my_model.py

23 lines
538 B
Python

import math
import random
from model.base_model import Model
class MyModel(Model):
def __init__(self):
super().__init__()
def init(self, coords):
"""
Put your initialization here.
"""
super().init(coords)
self.log("Nothing to initialize in your model now")
def fit(self, max_it=1000, visualize=False):
"""
Put your iteration process here.
"""
self.log("Nothing happens in your model now")
return self.best_solution, self.fitness_list