Pharmaceutical factory interval collaborative production method
By combining particle swarm algorithm and ant swarm algorithm, the allocation of pharmaceutical factory production plans is solved, and the problems of interval resource coordination and optimization in the existing technology are improved, and the production efficiency and process optimization effect are improved.
Patent Information
- Application Number
- CN202411853264.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-04
AI Technical Summary
It is difficult for existing pharmaceutical factories to effectively coordinate and optimize the internal resources within the interval during the production process, resulting in low production efficiency.
Using a method combining particle swarm algorithm and ant swarm algorithm, the production plan is split into sub-plans, and global and local searches are performed through these algorithms to optimize the allocation of sub-plans to each collaboration interval.
It improves the production efficiency of pharmaceutical factories, avoids repeated labor between intervals, optimizes production processes, and reduces waste and bottlenecks.
Smart Images

Figure CN119761743A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of collaboration between pharmaceutical factories, and in particular to a collaborative production method between pharmaceutical factories. Background Art
[0002] A pharmaceutical factory is a factory or enterprise that focuses on the production of medicines. These medicines can be prescription drugs, over-the-counter drugs, biological drugs, vaccines, traditional Chinese medicines or other forms of therapeutic drugs. Pharmaceutical factories play a vital role in protecting human health, preventing diseases and treating diseases.
[0003] Generally, pharmaceutical factories do not only produce one product, but also produce multiple products in a collaborative manner. During the production process in the pharmaceutical factory, it is necessary to coordinate and optimize the internal resources of the pharmaceutical factory to promote the work efficiency and production efficiency of the pharmaceutical factory. Therefore, a collaborative production method between pharmaceutical factories is proposed to solve the above problems. Summary of the invention
[0004] 1. Technical issues to be resolved The present invention aims to solve the deficiencies of the above-mentioned prior art and proposes a collaborative production method between pharmaceutical factories.
[0005] (II) Technical solution The technical solution of the present invention to solve the above technical problems is as follows: A collaborative production method between pharmaceutical factories, comprising the following steps: S1. Set n collaboration intervals and formulate a production plan, and then split the production plan into m sub-plans; S2, and use particle swarm algorithm combined with ant colony algorithm to allocate m sub-plans to n collaboration intervals; The S2 comprises the following steps: S2.1, initialization; S2.2, global search using particle swarm algorithm; S2.3, local search using ant colony algorithm; S2.4. Iterate, update, judge and output the optimal solution. The optimal solution output is how to allocate sub-plans corresponding to n collaborative intervals among m sub-plans.
[0006] Based on the above technical solution, the present invention can also be improved as follows.
[0007] Preferably, the specific steps of S2.1, initialization are as follows: The number of particles, inertia factor, learning factor and maximum speed parameters of the particle swarm algorithm are set; the number of ants, pheromone volatility coefficient, pheromone maximum value and pheromone minimum value parameters of the ant colony algorithm are set; the position and speed of the particle swarm are initialized; the pheromone matrix of the ant colony is initialized; the initial value of the pheromone concentration on all paths is the same.
[0008] Preferably, the specific steps of S2.2, using the particle swarm algorithm for global search are as follows: According to the speed and position update formula of the particle swarm algorithm, the speed and position of each particle are updated, and then the fitness value of each particle is calculated according to the fitness value calculation formula, and the individual optimal position and the global optimal position are updated; Speed update formula: , in, represents the velocity of the i-th particle at time t+1 in the j-th dimension, represents the velocity of the i-th particle at time t in the j-th dimension, represents the position of the i-th particle at time t in the j-th dimension, represents the inertia factor, represents the individual optimal solution of the i-th particle, represents the global optimal solution, and is the learning factor, and is a random number; Position update formula: , in, represents the position of the i-th particle at time t+1 in the j-th dimension, represents the position of the i-th particle at time t in the j-th dimension, represents the velocity of the i-th particle at time t+1 in the j-th dimension; Fitness value calculation formula: , in, represents the position of the i-th particle at time t in the j-th dimension, represents the velocity of particle i in the jth dimension at time t, represents the global optimal solution.
[0009] Preferably, the specific steps of S2.3, using the ant colony algorithm for local search are as follows: The global optimal position found by the particle swarm algorithm is used as the initial information matrix of the ant colony algorithm. Each ant constructs a path according to the path selection formula and updates the pheromone matrix according to the pheromone concentration update formula. Path selection formula: , in, represents the probability that the kth ant moves from point a to point b at time t, represents the pheromone concentration on the path from point a to point b at time t, It represents the inverse of the length of the path from point a to point b at a certain moment. and are the probability parameters, represents the set of cities that the k-th ant is allowed to choose next; Pheromone concentration update formula: , in, represents the pheromone concentration on the path from point a to point b at time t+1, is the pheromone volatility coefficient, It represents the increment of pheromone on the path from point a to point b from time t to t+1; Pheromone increment formula: , in, represents the updated amount of pheromone of the kth ant on the path from a to b, It is the total pheromone of ants. It is the total distance traveled by ant k from the starting point to the end point.
[0010] Preferably, the specific steps of S2.4, iterative updating, judging and outputting the optimal solution are as follows: Alternately perform the particle swarm algorithm global search and the ant colony algorithm local search to determine whether the global optimal position is continuous If the global best position does not reach continuous If the global optimal position does not change, continue to iterate and update. If there is no change, the iterative update is stopped and the global best position is output as the optimal solution. The optimal solution output is how to allocate sub-plans corresponding to n collaborative intervals among m sub-plans.
[0011] (III) Beneficial effects Compared with the prior art, the technical solution of this application has the following beneficial technical effects: 1. Through the area collaboration of the present invention, pharmaceutical factories can allocate production tasks more effectively and avoid duplication of labor between different areas, thereby improving overall production efficiency. The collaborative management method can also help pharmaceutical factories optimize production processes, reduce waste and bottlenecks in the production process, and further improve production efficiency.
[0012] 2. The present invention complements the global search capability of the particle swarm algorithm with the local search capability of the ant colony algorithm, thereby preventing the algorithm from falling into a local optimal solution and improving the performance and stability of the ant colony algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0015] A collaborative production method between pharmaceutical factories, comprising the following steps: S1. Set n collaboration intervals and formulate a production plan, and then split the production plan into m sub-plans; S2, and use particle swarm algorithm combined with ant colony algorithm to allocate m sub-plans to n collaboration intervals; The S2 comprises the following steps: S2.1, initialization; S2.2, global search using particle swarm algorithm; S2.3, local search using ant colony algorithm; S2.4. Iterate, update, judge and output the optimal solution. The optimal solution output is how to allocate sub-plans corresponding to n collaborative intervals among m sub-plans.
[0016] The n is 6, and the 6 cooperation intervals include: Set up the raw material preparation and proportioning interval, raw material mixing and emulsification interval, homogenization and pH value adjustment interval, standing and filtration interval, filling and packaging interval, and finished product inspection and quality control interval.
[0017] The collaborative process within the six zones includes the following steps: First, in the raw material preparation and proportioning section, raw material extraction is carried out (according to the formula of seaweed cleansing milk, appropriate raw materials are selected, including n kinds of agents (seaweed extract, surfactant, moisturizer (such as glycerin, butylene glycol, etc.), emulsifier, thickener, preservative, fragrance, etc.)), and then accurately weighed according to the formula ratio, and preliminary mixing and testing are carried out (to ensure the stability and efficacy of the formula); then in the raw material mixing and emulsification section, part of the water, moisturizer, emulsifier and other raw materials are pre-mixed to form an aqueous phase, and the active ingredients such as seaweed extract are dissolved or dispersed in an appropriate amount of solvent to form an oil phase or an active phase; then in the homogenization and pH value adjustment section, the emulsified emulsion is homogenized by a homogenizer to further refine the emulsion droplets and improve the stability and fineness of the product. According to the pH value requirements of the product, appropriate acid-base regulators are used to adjust to ensure that the pH value of the product is within an appropriate range; then in the standing and filtration section, the homogenized product is left to stand for a period of time to allow the various ingredients to fully blend and stabilize and pass through The filtration equipment removes impurities and particles in the product to ensure the clarity and purity of the product; then the filling and packaging section fills the filtered product into pre-prepared containers. The filling volume needs to be controlled during the filling process to ensure that the product content in each container meets the standard. The filled products are packaged, including labeling, boxing and other links. The packaging materials must meet the requirements of cosmetic packaging and have good sealing, moisture resistance and aesthetics; finally, the finished product inspection and quality control section conducts a comprehensive quality inspection on the packaged finished products, including appearance inspection, specification inspection, net content inspection, microbial index inspection, pH value inspection, etc. At the same time, efficacy testing can also be carried out to verify the cleaning effect of the product and the efficacy of seaweed extracts. During the entire production process, it is necessary to strictly abide by the relevant laws, regulations and standards for cosmetics production, and strictly control and supervise the raw materials, production environment, production equipment, etc. (At the same time, the production process needs to be standardized and managed to ensure that every link is strictly controlled and supervised).
[0018] Among them, the i-th sub-plan is denoted as P i , i∈[1,m], the jth cooperation interval is denoted as C j , j∈[1,6], and use the binary X ij represents the i-th sub-plan P i and the jth collaborative interval C j The mapping relationship of , thus obtaining the production plan allocation matrix X and the production plan scheduling allocation problem matrix V: In the formula, for example is the element in the i-th row and j-th column of the production plan allocation matrix X, representing the i-th sub-plan P i and the jth collaborative interval C jThe existing position relationship indicates that the i-th sub-plan P i Assigned to the jth cooperation interval C j Processing production; otherwise, it means the i-th sub-plan P i Not assigned to the jth cooperation interval C j Processing and production; In the formula, for example is the element in the i-th row and j-th column of the production planning and scheduling problem matrix V, representing the i-th sub-plan P i and the jth collaborative interval C j There is an incremental relationship.
[0019] The specific steps of S2.1, initialization are as follows: The number of particles, inertia factor, learning factor and maximum speed parameters of the particle swarm algorithm are set; the number of ants, pheromone volatility coefficient, pheromone maximum value and pheromone minimum value parameters of the ant colony algorithm are set; the position and speed of the particle swarm are initialized; the pheromone matrix of the ant colony is initialized; the initial value of the pheromone concentration on all paths is the same.
[0020] The specific steps of S2.2, using the particle swarm algorithm for global search are as follows: According to the speed and position update formula of the particle swarm algorithm, the speed and position of each particle are updated, and then the fitness value of each particle is calculated according to the fitness value calculation formula, and the individual optimal position and the global optimal position are updated; In the process of continuously updating the speed and position of each particle, particles from 1 to L generations will be generated. Let the position matrix X of the Lth generation particle be L Let matrix X be randomly initialized, and let the velocity matrix V of the Lth generation particle be L Assign the production plan scheduling problem matrix V to the production plan scheduling problem matrix and initialize it to 0, thereby generating the Lth population, and then the Lth generation production plan assignment matrix X L The distribution of particles in the matrix gives the two-dimensional particle matrix S: In the formula, for example It represents the i-th sub-plan P in the L-th generation i Assigned to the jth cooperation interval F j When a particle is generated in the two-dimensional particle matrix S, if the L-th generation production plan allocation matrix X L Medium Element If the weight of is 1, then the weight of the i-th row and j-th column in the two-dimensional particle matrix S is 1, otherwise, the weight of the i-th row and j-th column is 0; Then calculate the particle in the i-th row and j-th column of the two-dimensional particle matrix S In the Lth generation production plan allocation matrix XL The fitness in , the maximum fitness of the particle in the first L-1 generations and fitness For comparison, if > , then the maximum fitness The corresponding element The position of the L-th generation production plan allocation matrix X L The optimal position of the particle in the i-th row and j-th column in the search space , otherwise, the fitness The corresponding element The position of the L-th generation production plan allocation matrix X L The optimal position of the particle in the i-th row and j-th column in the search space , thereby obtaining the local optimal solution matrix of the particles in the two-dimensional particle matrix S in the Lth generation : = Then from the Lth generation local optimal solution matrix Select the position of the optimal solution corresponding to the maximum fitness in the i-th row as the position matrix X L The global optimal solution for the i-th row in is denoted as = ,in Represents the position matrix X L The global optimal solution of the i-th row in ; Calculate the fitness of the jth particle in the i-th row of the L+1th generation in the two-dimensional particle matrix S And the fitness of the corresponding particle in the Lth generation Compare and take the particle position corresponding to the larger fitness value as the optimal solution position of the jth particle in the i-th row of the L+1th generation in the two-dimensional particle matrix S ; Speed update formula: , in, represents the velocity of the i-th particle at time t+1 in the j-th dimension, represents the velocity of the i-th particle at time t in the j-th dimension, represents the position of the i-th particle at time t in the j-th dimension, represents the inertia factor, represents the individual optimal solution of the i-th particle, represents the global optimal solution, and is the learning factor, and is a random number; The above formula is a general formula. In combination with the present invention, the speed update formula can be transformed into: , Among them, V L+1 represents the velocity matrix of the L+1 generation particles, V L represents the velocity matrix of the Lth generation particles, represents the local optimal solution of the Lth generation particles, Represents the position matrix X L The global optimal solution for the i-th row in , and is the learning factor, and is a random number; Position update formula: , in, represents the position of the i-th particle at time t+1 in the j-th dimension, represents the position of the i-th particle at time t in the j-th dimension, represents the velocity of the i-th particle at time t+1 in the j-th dimension; The above formula is a general formula. In combination with the present invention, the location update formula can be transformed into: , in, represents the position matrix of the L+1th generation particles, represents the position matrix of the Lth generation particle, represents the velocity matrix of the Lth generation particles; Fitness value calculation formula: , in, represents the position of the i-th particle at time t in the j-th dimension, represents the velocity of particle i in the jth dimension at time t, represents the global optimal solution; The above fitness value calculation formula can be transformed into: , in, represents the position of the Lth generation particle, represents the velocity of the Lth generation particle, Represents the position matrix X L The global optimal solution for the i-th row in .
[0021] The specific steps of S4.3, using the ant colony algorithm for local search are as follows: The global optimal position found by the particle swarm algorithm As the initial information matrix of the ant colony algorithm, each ant constructs a path according to the path selection formula and updates the pheromone matrix according to the pheromone concentration update formula; Path selection formula: , in, represents the probability that the kth ant moves from point a to point b at time t, represents the pheromone concentration on the path from point a to point b at time t, It represents the inverse of the length of the path from point a to point b at a certain moment. and are the probability parameters, represents the set of cities that the k-th ant is allowed to choose next; Pheromone concentration update formula: , in, represents the pheromone concentration on the path from point a to point b at time t+1, is the pheromone volatility coefficient, It represents the increment of pheromone on the path from point a to point b from time t to t+1; Pheromone increment formula: , in, represents the updated amount of pheromone of the kth ant on the path from a to b, It is the total pheromone of ants. It is the total distance traveled by ant k from the starting point to the end point.
[0022] The specific steps of S2.4, iterative update, judgment and output of the optimal solution are as follows: Alternately perform the particle swarm algorithm global search and the ant colony algorithm local search to determine whether the global optimal position is continuous If the global best position does not reach continuous If the global optimal position does not change, continue to iterate and update. If there is no change, the iterative update is stopped and the global best position is output as the optimal solution. The optimal solution output is how to allocate the sub-plans corresponding to the 6 collaborative intervals among the m sub-plans.
[0023] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0024] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A collaborative production method between pharmaceutical factories, characterized in that: The following steps are involved: S1. Set n collaboration intervals and formulate a production plan, and then split the production plan into m sub-plans; S2, and use particle swarm algorithm combined with ant colony algorithm to allocate m sub-plans to n collaboration intervals; The S2 comprises the following steps: S2.1, initialization; S2.2, global search using particle swarm algorithm; S2.3, local search using ant colony algorithm; S2.
4. Iterate, update, judge and output the optimal solution. The optimal solution output is how to allocate sub-plans corresponding to n collaborative intervals among m sub-plans.
2. The method for collaborative production between pharmaceutical factories according to claim 1, characterized in that: The specific steps of S2.1, initialization are as follows: The number of particles, inertia factor, learning factor and maximum speed parameters of the particle swarm algorithm are set; the number of ants, pheromone volatility coefficient, pheromone maximum value and pheromone minimum value parameters of the ant colony algorithm are set; the position and speed of the particle swarm are initialized; the pheromone matrix of the ant colony is initialized; the initial value of the pheromone concentration on all paths is the same.
3. The method for collaborative production between pharmaceutical factories according to claim 1, characterized in that: The specific steps of S2.2, using the particle swarm algorithm for global search are as follows: According to the speed and position update formula of the particle swarm algorithm, the speed and position of each particle are updated, and then the fitness value of each particle is calculated according to the fitness value calculation formula, and the individual optimal position and the global optimal position are updated; Speed update formula: , in, represents the velocity of the i-th particle at time t+1 in the j-th dimension, represents the velocity of the i-th particle at time t in the j-th dimension, represents the position of the i-th particle at time t in the j-th dimension, represents the inertia factor, represents the individual optimal solution of the i-th particle, represents the global optimal solution, and is the learning factor, and is a random number; Position update formula: , in, represents the position of the i-th particle at time t+1 in the j-th dimension, represents the position of the i-th particle at time t in the j-th dimension, represents the velocity of the i-th particle at time t+1 in the j-th dimension; Fitness value calculation formula: , in, represents the position of the i-th particle at time t in the j-th dimension, represents the velocity of particle i in the jth dimension at time t, represents the global optimal solution.
4. The method for collaborative production between pharmaceutical factories according to claim 1, characterized in that: The specific steps of S2.3, using the ant colony algorithm for local search are as follows: The global optimal position found by the particle swarm algorithm is used as the initial information matrix of the ant colony algorithm. Each ant constructs a path according to the path selection formula and updates the pheromone matrix according to the pheromone concentration update formula. Path selection formula: , in, represents the probability that the kth ant moves from point a to point b at time t, represents the pheromone concentration on the path from point a to point b at time t, It represents the inverse of the length of the path from point a to point b at a certain moment. and are the probability parameters, represents the set of cities that the k-th ant is allowed to choose next; Pheromone concentration update formula: , in, represents the pheromone concentration on the path from point a to point b at time t+1, is the pheromone volatility coefficient, It represents the increment of pheromone on the path from point a to point b from time t to t+1; Pheromone increment formula: , in, represents the updated amount of pheromone of the kth ant on the path from a to b, It is the total pheromone of ants. It is the total distance traveled by ant k from the starting point to the end point.
5. The method for collaborative production between pharmaceutical factories according to claim 1, characterized in that: The specific steps of S2.4, iterative update, judgment and output of the optimal solution are as follows: Alternately perform the particle swarm algorithm global search and the ant colony algorithm local search to determine whether the global optimal position is continuous If the global best position does not reach continuous If the global optimal position does not change, continue to iterate and update. If there is no change, the iterative update is stopped and the global best position is output as the optimal solution. The optimal solution output is how to allocate sub-plans corresponding to n collaborative intervals among m sub-plans.
Citation Information
Patent Citations
Service resource allocation method for improving particle swarm algorithm
CN113256094A
Method for solving TSP problem based on particle swarm optimization ant colony algorithm
CN117057390A