This project presents a mobile implementation of the calculation of the solution of a specific task of the theory of schedules by the Goldberg method with different formation of the initial generation.
Python support is provided by:
- build.gradle(project)
buildscript { repositories { maven { url "https://chaquo.com/maven"} } dependencies { classpath "com.chaquo.python:gradle:14.0.2" } } plugins { id 'com.android.application' version '7.4.0' apply false id 'com.android.library' version '7.4.0' apply false id 'com.chaquo.python' version '14.0.2' apply false }
- build.gradle(:app)
plugins { id 'com.android.application' id 'com.chaquo.python' } android { namespace 'com.example.lab1' ompileSdk 33 defaultConfig { sourceSets { main { python.srcDir "some/main/python" } } python { version "3.8" buildPython *your python.exe file* (for e.g. "/usr/bin/python3" or "C:/ProgramData/Anaconda3/python.exe") pip { install "tqdm" install "colorama" install "matplotlib" } } ndk { abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" } applicationId "com.example.lab1" minSdk 24 targetSdk 33 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { implementation 'com.github.MikeOrtiz:TouchImageView:1.4.1' implementation 'io.apisense:rhino-android:1.0' implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.8.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.navigation:navigation-runtime:2.5.3' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' implementation 'com.google.code.gson:gson:2.8.9' implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:converter-gson:2.5.0' }
If the data entered by the user is correctly validated, the transition
to the next window occurs, otherwise errors by type pop up:
Error #1 (going beyond acceptable values):
Error #2 (Incorrect data type):
When you click on the "ГОТОВЫЙ ВАРИАНТ"(“READY OPTION”) button,
the matrix is read from the file system generated during the old iterations
and goes to the next:
When you click on the "НОВАЯ МАТРИЦА"(“NEW MATRIX”) button,
a new matrix is generated, uploaded to a file inside the system
and moved to the next window:
Validation check for the field (EditText Object) repeats:
When you click on the "КОНКРЕТНЫЙ МЕТОД"(“SPECIFIC METHOD”) button without
selecting more than one of the methods (RadioButton objects), the following
error window will pop up:
Transition with the Method Selection combination + Specific Method/All methods:
When you click on the “NEXT” button without selecting any of the methods
(RadioButton objects), the following error window will pop up:
When you click on the ("СТАРТ")“START” button, the Genethic Algorythm start
is initialized:
When you click on the “SHOW JSON” button, a JSON file is shown that is fed
inside the python-script:
When you click on the “OK" button, the generation of histograms begins:
Clicking on the histogram takes you to the demo window: