summaryrefslogtreecommitdiff
path: root/src/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.py')
-rw-r--r--src/main.py21
1 files changed, 9 insertions, 12 deletions
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)