2022-06-14 16:46:11 +02:00
|
|
|
// Copyright 2022 wanderer <a_mirre at utb dot cz>
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
2022-06-14 22:34:52 +02:00
|
|
|
"sync"
|
|
|
|
|
|
|
|
"git.dotya.ml/wanderer/math-optim/algo"
|
2022-06-15 23:36:47 +02:00
|
|
|
"git.dotya.ml/wanderer/math-optim/report"
|
2022-06-14 16:46:11 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
var version = "development"
|
|
|
|
|
|
|
|
func main() {
|
2022-06-14 22:34:52 +02:00
|
|
|
log.Println("starting math-optim version", "'"+version+"'")
|
|
|
|
|
|
|
|
// atm we're only doing Random search and SHC
|
|
|
|
algoCount := 2
|
|
|
|
|
|
|
|
var wg sync.WaitGroup
|
|
|
|
|
|
|
|
wg.Add(algoCount)
|
|
|
|
|
2022-07-16 22:05:15 +02:00
|
|
|
var m sync.Mutex
|
|
|
|
|
|
|
|
go algo.DoRandomSearch(&wg, &m)
|
|
|
|
go algo.DoStochasticHillClimbing(&wg, &m)
|
2022-06-14 22:34:52 +02:00
|
|
|
|
|
|
|
wg.Wait()
|
|
|
|
|
2022-07-16 22:05:15 +02:00
|
|
|
report.SaveTexAllPics()
|
2022-07-16 23:30:56 +02:00
|
|
|
report.SaveTexAllTables()
|
2022-06-15 23:36:47 +02:00
|
|
|
report.Print()
|
|
|
|
|
2022-06-14 22:34:52 +02:00
|
|
|
log.Println("looks like we're done")
|
2022-06-14 16:46:11 +02:00
|
|
|
}
|