magicfile icon Magic file website -

Example of source and code in the subject of nuclear algorithm

نمونه-سورس-و-کددر-موضوع-الگوريتم هسته-اي
Short description and download link
Today, in this post, for you, dear users of the MagicFile website, we have provided a sample source and code on the subject of the nuclear algorithm, ready for download.


List of similar files

Short link:
Full description of the file

Download sample source and code in the topic of nuclear algorithm

Today, in this post, for you, dear users of the magic file website, we have put a sample source and code in the topic of nuclear algorithm ready for download.

Sample image at runtime

نمونه سورس و کد در موضوع الگوريتم هسته اي

Learn more about the kernel algorithm

Introduction: This is the first generation of very new algorithms. We propose a famous phenomenon in nuclear physics called nuclear fission on the optimization problem. Main definitions: nuclear fission: when a neutron hits the nucleus of an atom of the uranium 235 isotope, it causes that nucleus to split into two pieces, each of which contains a nucleus with about half of the protons and neutrons of the main nucleus. Is. In the fission process, a large amount of thermal energy is released, as well as gamma rays and two or more neutrons. Under certain conditions, the runaway neutrons collide with surrounding uranium nuclei, causing further fission of the surrounding uranium nuclei, which then emit more neutrons that split more nuclei. This series of rapidly increasing fissions culminates in a chain reaction in which almost all of the fissile material is consumed. Fission of neutron and proton: Neutron: fundamental particle in the nucleus of the atom that has no electric charge, we will show it as {name, value}, in our proposed example: the name will be an alphabetic letter and the value refers to below. The weight between the current neutron and the next neutron. Proton: fundamental particle with positive electric charge, in our proposed example, we show it as a {name, value}: the name will always be [PROTON] and the value is omitted because we ignore the electric effect here. The reason for using protons will be mentioned later. Nucleus: an organized group of neutrons and protons (because order is important in our example). Compression: describes the internal structure of the nucleus, here it is defined as the total number of neutrons inside the nucleus. Redundancy: It also describes the internal structure of the nucleus and is defined as the highest frequency among all neutrons inside the nucleus. Of course, it cannot be less than one potential: the latent power of the kernel describes its ability in the best solution (in case of maximization or minimization). It is performed for each nucleus with the total weight of all neutrons in the nucleus. We will look for the optimal kernel with the lowest potential (for example, the minimization problem) that satisfies the compression and redundancy conditions. Criticality: The critical state (total reaction) is determined by the probability that a neutron released in fission causes the next fission. If, on average, less than one neutron causes another fission, the fission rate decreases over time and eventually decreases. Zero is called this sub-critical situation. When more than one neutron causes the next fission, the fission speed and power increase and the state is called supercritical. Thermonuclear factor: the more powerful the explosion, the more thermal energy is produced, as more neutrons are released after each fission unit, more heat (bigger explosion) is produced (this increases the criticality of the reaction gives), here it is determined by the average number of released. Neutrons are the cause of atomic decay: after splitting, the unstable atomic nucleus breaks into a more stable nucleus that emits beta particles and gamma rays. In negative beta decay (with the symbol ?--decay), an unstable nucleus emits an energetic electron and a podneutrino, and a neutron in the nucleus turns into a proton, which remains in the nucleus of the product. Here we have neglected electron and antineutrino effects to keep things simple. We will choose the worst neutron nucleus for that decay. The basics of this algorithm will help: Data structure diagram and implementation: We will try to consider the simplest way to implement our concepts. Otherwise, the calculations will be very complicated. ??Simulation_Problem class: The problem is simulated by a two-dimensional array that shows the travel costs from state X1 to state X2. States are named alphabetically. . Z} This class is created every time you load the program to generate a new random matrix of real numbers. To get the cost [X1 - X2] we will look at row X1 and column X2 in the matrix. ??neutron class: (name as string, value as double) This is used for neutrons and protons, but when used for protons the name will be "PROTON", when for neutrons is used, the name will be a name. Nucleus class alphabet: -Sub Random_Fill_Nucleus(): to fill it with random neutrons and protons after each reaction. -Function Potentiality(): To get the total weights of the kernel, we want to minimize it to reach the lowest possible cost, and this is what the reaction will do. -Function Redundancy(): searches for the maximum redundancy in the core, this is a harsh term that many solutions are eliminated because of it, as we will see later, it cannot be less than one. -Function Compactness(): the number of neutrons we have obtained in the nucleus, this will be an important condition in the optimal solution, where we are committed to its minimum value, there is no specific answer to this problem, so we will solve did abo has a specific compression threshold and leaves the determination of the best answer to the end user. -Sub Emit_Beta(): looks for the neutron with the worst value in the nucleus and turns it into a proton. Class Serial_Reaction: -Sub initialize(): For all material values: generate a random kernel without redundancy (add = 1) and calculate the weight of all random kernels. We also have an array of active neutrons and fill it with a user-defined initial released neutron (which is a random number of neutrons), sure that this will affect the intensity of the nuclear reaction. If we have not previously determined any value for the best solution, assign any kernel to it. (This only happens before the first reaction). -Sub Release(): applies a set of reactions to the material and is represented by these steps: check the stopping factor to see if we should force a stop for each nucleus in the material: -a random neutron from the set of active neutrons receive the . - Generation of a suitable random integer to determine the location of the impact - Placing the active neutron inside the core to perform the impact - If the impact core meets the threshold of redundancy and compression, it will not be sacrificed. But to continue the reaction, it is marked as "not ready" and added to the list of candidates. - If the impact nucleus does not meet the thresholds, it undergoes nuclear fission: + Divide the nucleus into two equal parts. + Look for neutrons with the best value (lowest value) in each part. + Add the best found neutrons to the list of active neutrons according to the thermonuclear factor + then both parts undergo atomic decay according to the atomic decay factor. + Process radioactive nuclei after atomic decay (remove the invalid excess and recalculate the values ​​of both parts because the structure of the nucleus has changed) and then add to the candidate list. Check the list of new candidates: If we find a core with a better total cost (lower potential), this is our best new solution. Call Sub initialize() to prepare for the new reaction. Using the program: [Please read the entire article before running the program] Actually, the program does most of the work for you, creating a new problem at each start, you just need to set the appropriate parameters for the algorithm. Don't use a large amount of material or a large atomization factor (we'll get to that), too much material or a large core size will crash your computer. (I'm using core2dou with a 4GB RAM computer for the default parameters) The stopping factor determines the number of reactions, and since we used the letters A..Z as possible states, the compression cannot exceed 26 (the interface is sensitive to most parameters protects). Press Start to start, if it takes too long, press Stop and change the parameters to study their effect. (You may need to implement a new problem in the code to study the effect well) In the title above the form, you will see the number of unique solutions (duplicate solutions are removed from this) and optimal solutions in the box. The text is printed. In the middle of the points of interest form: we found that the optimal kernel size for many samples can be estimated by this equation: kernel size = compression factor * 2 + redundancy factor so it is automatically adjusted by the program. If you study the code deeply, you will realize that the state of every reaction will be supercritical at the beginning. And after time it becomes sub-critical. This is good because we are not sure of the absolute compression value and this method gives us a good range of compression due to splitting. Sometimes, if you change the parameters, you will see that after some time the reaction state becomes sub-critical and then all the fissile materials are consumed, so the serial reaction does not continue, you should try to avoid going through this state. Here we implemented sub To-String() to show only neutrons, actually if you show the whole nucleus (sometimes) you will see protons in it, in our implementation we bypassed these protons because We assumed that their occurrence or order has no effect. Calculation of the weight in the real world, the neutrons released after the fission will be two or more, so to maintain the supercritical state and avoid being in the "fissile material is consumed" state, choose a suitable number (of course, greater than one). Select as a thermonuclear agent. Due to the nature of the atomic decay mechanism, compression is deeply affected by the atomic decay factor, so you should choose a relatively small number (but greater than zero). The nuclei will initially have a large potential where the reaction will be supercritical and due to fission (which reduces the compression and thus the total cost of neutrons) the nuclei will have a low potential where the reaction will become subcritical. and this is what we want because it is active. Neutrons hit nuclei with small potential to produce more optimal solutions. The function Redundancy_Killer() is very important to reduce the redundancy to the minimum level (1) so that we can generate new comparable random kernels. In this example, the nuclei were initialized with 10% of protons. Real world application (example): An airline company wants a schedule to organize its flights in many countries, visiting at least X airports with the least amount of fuel, and with conditions such as: it should not visit the same airport more than (N) . load) 3 or 4 times.. because there will not be many passengers and therefore the economic income will not be optimal. It is a kernel algorithm where: Neutron: Airport kernel: Compression work schedule: X Redundancy: N Potential: Total cost of traveling through airports (per kernel) Other factors are empirical and adjusted by the user to reach the best answer. They become Kernel vs. Genetic Algorithms (Why is Kernel Better?): Genetic algorithms (unlike here) do not directly remove a bad gene from the candidate solution. Instead, it needs many generations (mutation and crossover). In genetic algorithms, the genome length is fixed, unlike kernel algorithms, which can be used to solve problems where the solution length is unknown. Genetic algorithms do not identify "unknown" or "dead end" sub-solutions, while here (proton) is identified. Nuclear algorithms converge much faster than genetic algorithms due to atomic decomposition. The genetic algorithm does not deal with hard conditions such as the maximum allowed repetition of certain genes in a chromosome, and if you try to implement this, you will later find that these conditions make the genetic algorithm converge (much slower). Genetic Algorithms are heavily influenced by the previous generation, which can be bad, but kernel algorithms start randomly after each reaction, so there is a higher chance of finding a new undiscovered better solution (as a completely new breed in GA) after the last reaction. Genetic algorithms talk about blind (unstudied) mutations and do not use any function to find the "best mutation", unlike nuclear algorithms that use "best weight neutrons" to do nuclear fission.

Main features:

  • High speed and performance at runtime
  • Adjustability (atomic decay factor - nuclear factor oriented - amount of material - nuclear size - stopping factor - compression threshold - Terschold redundancy - primary released neutrons)
  • Display information table
  • And ...

Dear users, it is recommended to download.

Click on the link below to get a sample of the source and code of in the subject of nuclear algorithm

Click here to download

Files that you may need

دانلود-سورس-کد-لینک-دانلود-تصاویر-و-فیلم اينستاگرام-با-b4a-بيسيک-فور-اندرويد

Download source code link to download Instagram images and videos with b4a Basic For Android

more details

User comments

کد امنیتی

Comment sent by Arianosh - 2022/12/28 11:59:36 pm
Hello dear, thank you for treating users fairly
The answer of the magic file support
Hello Your honor
Comment posted by Shifeta - 2023/1/31 3:53:09 am
I thank the teacher for posting this file I downloaded it, it was good and complete
The answer of the magic file support
Hello Thank you for sending your opinion
Comment sent by Pari - 2022/12/05 9:51:21 pm
Hello Engineer, don't hurt your hands, I downloaded it completely
The answer of the magic file support
Hello that's kind of you

List of website special files

Download automatic translation software for po, pot files in full for all languages, including Persian

Download software to convert text file to vcf (mobile contact)

Download software to change the source language and code of Visual Studio (design elements of form design)

The best notification service push script notification management and build site notification push