From 5e9eebd534f96042b5802e6f6be2b66ecb7fd271 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 19 May 2022 21:30:38 +0400 Subject: feat: add research methods --- src/main.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/main.py') diff --git a/src/main.py b/src/main.py index 551595e..cdbf16e 100644 --- a/src/main.py +++ b/src/main.py @@ -1,16 +1,13 @@ from simple import SIMPLE +from research import Research -problem = SIMPLE((1, 2), (0.7, 0.5), 0.02, 120) -problem.prep() +model = SIMPLE((1, 2), (0.7, 0.5), 0.02, 120) -error = 1 -iteration = 0 -while error > 10 ** -7: - iteration += 1 - problem.iterate() - error = problem.avg_error() - print(f'Iteration {iteration}') - print(f'Avg error: {error}') +research = Research(model, '07x05_002') - if iteration % 5 == 0 or iteration == 1: - problem.plot(True, 2) +is_complete = research.load() + +if is_complete: + research.inspect() +else: + research.solve(preview=True, save_plot=True, save_model=True) -- cgit v1.2.3