Disclosure of Invention
The invention aims to overcome the defects in the prior art, and provides a dimension self-adaptive lamp arrangement method based on a particle swarm algorithm, which can determine a self-adaptive adjustment strategy of search dimension according to a global optimal value in a current search space, and reduces energy consumption as much as possible while optimizing the arrangement position of lamps.
The invention aims at realizing the following technical scheme:
a dimension self-adaptive lamp arrangement method based on a particle swarm algorithm comprises the following steps:
s1, selecting a lamp arrangement type, wherein the lamp arrangement type specifically comprises a regular arrangement mode and a free arrangement mode;
S2, determining illumination requirements of each area in the space according to illumination standards and space function partition conditions, and simultaneously carrying out plane grid division on the space, and calculating to obtain a grid position matrix (X, Y) and an illumination requirement matrix I D corresponding to the grid;
S3, initializing lamp arrangement parameters, wherein the lamp arrangement parameters comprise room shape parameters, lamp quantity parameters, lamp height H L and working face height H S, and the room shape parameters comprise a room H and a depth W;
s4, optimizing the arrangement form under the lamp arrangement parameters through a standard particle swarm algorithm, and recording the arrangement form of the optimal individuals g best of the colony;
s5, checking whether the optimal arrangement form of the group meets the illumination requirements of all areas, if so, performing low-carbon energy-saving self-adaptive correction, and if not, performing compliance self-adaptive correction;
s6, optimizing the arrangement form of the lamp after self-adaptive correction based on a standard particle swarm algorithm;
S7, for the adaptive correction of the compliance, repeating the steps S5 and S6 until the illumination requirements of all areas are met, completing the dimension adaptive optimizing process, and obtaining the final result by the number of lamps and the corresponding illumination in the last iteration of the illumination requirements of all areas;
And (5) repeating the steps S5 and S6 for low-carbon energy-saving self-adaptive correction until the illumination requirements of all areas cannot be met, completing the dimension self-adaptive optimizing process, and obtaining the final result by the number of lamps and the corresponding illumination in the last iteration of the illumination requirements of all areas.
Furthermore, in step S1, the regular arrangement manner can realize the optimization of the number of rows and columns of lamps and the positions of the lamps in each row and column in space, and minimize the illumination energy consumption while meeting the illumination requirements of different areas.
Further, in step S1, the free arrangement manner can realize optimization of the number of lamps and the positions of each lamp in the space, and minimize the illumination energy consumption while meeting the illumination requirements of different areas.
Further, in step S3, for the lamp quantity parameter, in the regular arrangement mode, the lamp quantity parameter input form is the number N x of rows, the number N y of columns, the lamp positions L rx of each row, and the lamp positions L cy of each column, and in the free arrangement mode, the lamp quantity parameter input form is the number N, and the lamp positions (L jx,Ljy).
Further, the step S4 specifically includes:
(401) Initializing parameters of a particle swarm algorithm, wherein the parameters comprise a population size N p, iteration times g, an inertia factor omega, a learning factor c 1 and a learning factor c 2;
(402) Initializing a primary population, each particle initial velocity The initial position X i is a random number between the opening H and the depth W;
(403) Calculating the position information of the lamp based on the position information of each particle, and calculating the space illuminance condition after the lamp is turned on through lighting simulation software Radiance;
(404) Calculating a fitness function E (N) of each particle, wherein the fitness function E (N) is defined as follows:
Wherein n is a grid number, m is the number of grids, I n is the illuminance value at the center point of the grid after the nth grid is turned on, and I D,n is the illuminance requirement value at the center point of the nth grid;
(405) Detecting whether the illuminance values at the central points of all grids in the space after the lamp is turned on meet the illuminance requirement values, if not, calculating a penalty function U (N), wherein the penalty function U (N) is defined as:
U(N)=E(N)+C
Wherein, C is punishment item, and its value is positive integer;
(406) Determining and recording the optimal p best and the optimal g best of each particle individual and the optimal group of individuals in the current generation group,
(407) Updating the particle velocity v i and the position x i of the population, which are defined as:
Where D is the current search dimension, d=1, 2. I is the ith particle in the population, k is the kth generation population, r 1、r2 is a random number;
(408) Judging whether the population is converged, if not, repeatedly executing (402) - (407) until the population is converged;
(409) And outputting the group optimal individuals g best.
Further, in step S5, the following steps are performed for the adaptive correction of the compliance:
(5011) Initializing self-adaptive mechanism related parameters, wherein the self-adaptive mechanism related parameters comprise self-adaptive level CL=1, adjustment amplitude DR=2 CL-1, self-adaptive adjustment times C=0 and adjustment level change threshold T;
(5012) C=c+i, where i is the i-th execution of the adaptive luminaire number correction;
(5013) Judging the magnitude relation between the current self-adaptive adjustment times C and the adjustment level change threshold T, and when C is greater than or equal to T and the optimization result of the current state meets the illumination requirements of all areas, adjusting the current self-adaptive level CL to be CL=CL+1, and updating the adjustment amplitude DR, wherein DR=2 CL-1;
(5014) Judging the magnitude relation between the current self-adaptive adjustment times C and the adjustment level change threshold T, and when C is smaller than T, not adjusting the current self-adaptive level CL, and updating the adjustment amplitude DR, wherein DR=2 CL-1;
(5015) According to the adjustment amplitude and the lamp arrangement type, the number of the existing lamps is adjusted;
When the lamp arrangement type is a regular arrangement mode, the lamp quantity parameter input form is the number of rows N x and the number of columns N y, the size relation of H/W and N x/Ny is compared, when H/W is more than N x/Ny, the lamp number of rows N x,Nx=Nx +DR is adaptively corrected, when H/W is less than N x/Ny, the lamp number of columns N y,Ny=Ny +DR is adaptively corrected,
When the lamp arrangement type is a free arrangement mode, the number N of the lamps is adaptively corrected, wherein N=N+DR.
Further, in step S5, the low-carbon energy-saving adaptive correction step is as follows:
(5021) Initializing self-adaptive mechanism related parameters, wherein the self-adaptive mechanism related parameters comprise self-adaptive level CL=1, adjustment amplitude DR=2 CL-1, self-adaptive adjustment times C=0 and adjustment level change threshold T;
(5022) C=c+i, where i is the i-th execution of the adaptive luminaire number correction;
(5023) Judging the magnitude relation between the current self-adaptive adjustment times C and the adjustment level change threshold T, and when C is greater than or equal to T and the optimization result of the current state meets the illumination requirements of all areas, adjusting the current self-adaptive level CL to be CL=CL+1, and updating the adjustment amplitude DR, wherein DR=2 CL-1;
(5024) Judging the magnitude relation between the current self-adaptive adjustment times C and the adjustment level change threshold T, and when C is smaller than T, not adjusting the current self-adaptive level CL, and updating the adjustment amplitude DR, wherein DR=2 CL-1;
(5025) According to the adjustment amplitude and the lamp arrangement type, the number of the existing lamps is adjusted,
Comparing the magnitude relation of H/W and N x/Ny when the lamp arrangement type is a regular arrangement mode, adaptively correcting the number of lamp columns N y,Ny=Ny -DR when H/W is larger than N x/Ny, and adaptively correcting the number of lamp rows N x,Nx=Nx -DR when H/W is smaller than N x/Ny;
when the lamp arrangement type is a free arrangement mode, the number N of the lamps is adaptively corrected, wherein N=N-DR.
Compared with the prior art, the technical scheme of the invention has the following beneficial effects:
1. The dimension self-adaptive correction technology is used for optimizing the arrangement problem of the lighting fixtures, redundant illumination is reduced to the maximum extent on the premise of meeting the indoor light environment illumination requirement, and the energy saving and emission reduction effects are achieved. Compared with the traditional optimization algorithm, the self-adaptive dimension correction can dynamically change the optimization dimension (namely the number of lamps) of the optimization algorithm, and the self-adaptive level and the self-adaptive correction amplitude can be adjusted by analyzing the current optimization result and the expected target (or standard), so that the defects that the optimization dimension cannot be changed and the manual debugging is time-consuming and labor-consuming in the traditional method are overcome, the indoor illumination lamp arrangement optimization can be realized rapidly, and the light waste can be avoided.
2. Based on the contradiction, the invention develops a self-adaptive particle swarm algorithm by expanding an optimization algorithm flow on the basis of a standard particle swarm, the algorithm can realize dimension self-lifting according to an optimization result in an optimization process, the problem that a designer cannot determine a specific scheme in the initial design stage is solved by a self-adaptive dimension reduction process, the design efficiency is improved to the greatest extent, and the optimization effect is ensured.
3. The invention can adapt to dimensional change in lamp arrangement optimization, and can minimize illumination energy consumption while meeting all illumination requirements.
Detailed Description
The invention is described in further detail below with reference to the drawings and the specific examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. The invention is intended to cover any alternatives, modifications, equivalents, and variations that fall within the spirit and scope of the invention.
The invention is more particularly described by way of example in the following paragraphs with reference to the drawings. It should be noted that the drawings are in a simplified form and are not to scale precisely, but rather are merely intended to facilitate and clearly illustrate the embodiments of the present invention.
The present embodiment uses a rectangular office space in a certain area as a target space, and it is apparent that the embodiments described below are only some, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1.
Referring to fig. 1-4 and fig. 6, the dimension adaptive office lamp arrangement method based on the particle swarm algorithm in this embodiment includes the following steps:
s1, selecting a lamp arrangement type;
In the embodiment, a regular arrangement mode is adopted, the arrangement mode of lamps is determinant (i.e. lamps are arranged in a transverse and longitudinal grid mode), the number of lamps is represented as L rx by the number of rows N x and the number of columns N y, and the positions of lamps in each row are represented as L cy;
s2, space grid division and partition illuminance determination;
As shown in fig. 2, the spatial working surface is plane-meshed, where the mesh density in this embodiment is 2×2.
The illumination of each region in the space is divided according to the illumination standard and the space function partition condition, and the illumination is divided into 3-level illumination requirements of 200lux, 300lux and 400lux in the embodiment,
Calculating to obtain a grid node coordinate information matrix (X, Y) and an illuminance requirement matrix I D corresponding to the grid;
s3, initializing lamp arrangement parameters,
The lamp arrangement parameters include a lamp arrangement type (rule type), a room shape parameter of the room H and a depth W (h=28, w=20 in the present embodiment), a lamp height H L (H L =3.3 in the present embodiment), a work surface height H S (H S =0.9 in the present embodiment), and a rule type lamp number parameter N x,Ny (N x=3,Ny =4 in the present embodiment);
S4, as shown in FIG. 3, the position arrangement of the existing lamp based on the standard particle swarm optimization is optimized,
(1) Initializing parameters of a particle swarm algorithm, specifically including population size N p, iteration times g, inertia factor omega, learning factors c 1 and c 2,
(2) Initializing a primary population, each particle initial velocityThe initial position X i is a random number between the opening H and the depth W,
(3) Calculating lamp position information based on the position information of each particle, and calculating the space illuminance condition after the lamp is turned on through Radiance, (specifically adopting a standard PSO algorithm);
(4) Calculating a fitness function E (N) of each particle, wherein the fitness function E (N) is defined as follows:
Wherein n is a grid number, m is the number of space grids, I n is the illuminance value at the center point of the grid after the nth grid is turned on, I D,n is the illuminance requirement value at the center point of the nth grid,
(5) Detecting whether the illuminance values at the central points of all grids in the space after the lamp is turned on meet the illuminance requirement values, and if not, calculating a penalty function U (N), wherein the penalty function U (N) is defined as:
U(N)=E(N)+C
Wherein, C is a punishment term, the value of which is a larger positive integer,
(6) Determining and recording the optimal p best of each particle individual and the optimal g best of the population,
(7) Updating the particle velocity v i and the position x i of the population, which are defined as:
Where D is the current search dimension, d=1, 2. I is the ith particle in the population, k is the kth generation population, r 1、r2 is a random number;
(8) Judging whether the population is converged, if not, repeating the steps (2) - (7) until the population is converged;
(9) Outputting a population optimal individual g best;
S5, checking whether the current arrangement form meets the illumination requirements of all areas, if so, performing low-carbon energy-saving self-adaptive correction, and if not, performing compliance self-adaptive correction.
S6, correcting the number of the self-adaptive lamps. Comprising the following steps:
Compliance-based adaptive correction, see fig. 4:
(6011) Initializing related parameters of an adaptive mechanism, wherein the related parameters specifically comprise an adaptive level CL=1, an adjustment amplitude DR=2 CL-1, an adaptive adjustment frequency C=0 and an adjustment level change threshold T;
(6012) C=c+i, where i is the i-th execution of the adaptive luminaire number correction;
(6013) Judging the magnitude relation between the current self-adaptive adjustment times C and the adjustment level change threshold T, and when C is greater than or equal to T and the optimization result of the current state meets the illumination requirements of all areas, adjusting the current self-adaptive level CL to be CL=CL+1, and updating the adjustment amplitude DR, wherein DR=2 CL-1;
(6014) Judging the magnitude relation between the current self-adaptive adjustment times C and the adjustment level change threshold T, and when C is smaller than T, not adjusting the current self-adaptive level CL, and updating the adjustment amplitude DR, wherein DR=2 CL-1;
(6015) Comparing the size relation of H/W and N x/Ny, when H/W is larger than N x/Ny, adaptively correcting the number of lamp rows N x,Nx=Nx +DR, and when H/W is smaller than N x/Ny, adaptively correcting the number of lamp columns N y,Ny=Ny +DR;
low-carbon energy-saving adaptive correction, see fig. 6:
(6021) Initializing related parameters of an adaptive mechanism, wherein the related parameters specifically comprise an adaptive level CL=1, an adjustment amplitude DR=2 CL-1, an adaptive adjustment frequency C=0 and an adjustment level change threshold T;
(6022) C=c+i, where i is the i-th execution of the adaptive luminaire number correction;
(6023) Judging the magnitude relation between the current self-adaptive adjustment times C and the adjustment level change threshold T, and when C is greater than or equal to T and the optimization result of the current state meets the illumination requirements of all areas, adjusting the current self-adaptive level CL to be CL=CL+1, and updating the adjustment amplitude DR, wherein DR=2 CL-1;
(6024) Judging the magnitude relation between the current self-adaptive adjustment times C and the adjustment level change threshold T, and when C is smaller than T, not adjusting the current self-adaptive level CL, and updating the adjustment amplitude DR, wherein DR=2 CL-1;
(6025) The number of the existing lamps is adjusted according to the adjustment amplitude and the lamp arrangement type, and the specific method is that the size relation of H/W and N x/Ny is compared, when HW is larger than N x/Ny, the number of lamp columns N y,Ny=Ny -DR is adaptively corrected, and when H/W is smaller than N x/Ny, the number of lamp rows N x,Nx=Nx -DR is adaptively corrected.
And S7, optimizing the arrangement form of the lamp after the self-adaptive correction based on a standard particle swarm algorithm.
S8, for the adaptive correction of the compliance, repeating the steps S5-S7 until the illumination requirements of all areas are met, finishing the dimension adaptive optimizing process, and obtaining the final result by the last iteration parameter and the optimizing result which meet the illumination requirements of all areas,
And (5) repeating the steps S5-S7 for low-carbon energy-saving self-adaptive correction until the illumination requirements of all areas cannot be met, completing the dimension self-adaptive optimizing process, and obtaining a final result after the last iteration parameter and the optimizing result of the illumination requirements of all areas are met.
Example 2.
Referring to fig. 1-3, 5 and 7, the dimension adaptive office lamp arrangement method based on the particle swarm algorithm in this embodiment includes the following steps:
s1, selecting a lamp arrangement type;
the embodiment adopts a free arrangement mode, the lamps can be freely arranged at any position, the number of the lamps is represented as N, and the positions of the lamps are represented as (L jx,Ljy);
s2, space grid division and partition illuminance determination;
As shown in fig. 2, the spatial working surface is plane-meshed, where the mesh density in this embodiment is 2×2.
The illumination of each region in the space is divided according to the illumination standard and the space function partition condition, and the illumination is divided into 3-level illumination requirements of 200lux, 300lux and 400lux in the embodiment,
Calculating to obtain a grid node coordinate information matrix (X, Y) and an illuminance requirement matrix I D corresponding to the grid;
s3, initializing lamp arrangement parameters,
The lamp arrangement parameters include a lamp arrangement type (free type), a room shape parameter of the room H and a depth W (l=28, w=20 in the present embodiment), a lamp height H L (H L =3.3 in the present embodiment), a work surface height H S (H S =0.9 in the present embodiment), and a lamp parameter N (n=12 in the present embodiment);
S4, as shown in FIG. 3, the position arrangement of the existing lamp based on the standard particle swarm optimization is optimized,
(1) Initializing parameters of a particle swarm algorithm, specifically including population size N p, iteration times g, inertia factor omega, learning factors c 1 and c 2,
(2) Initializing a primary population, each particle initial velocityThe initial position X i is a random number between the opening H and the depth W,
(3) Calculating lamp position information based on the position information of each particle, and calculating the space illuminance condition after the lamp is turned on through Radiance, (specifically adopting a standard PSO algorithm);
(4) Calculating a fitness function E (N) of each particle, wherein the fitness function E (N) is defined as follows:
Wherein n is a grid number, m is the number of space grids, I n is the illuminance value at the center point of the grid after the nth grid is turned on, I D,n is the illuminance requirement value at the center point of the nth grid,
(5) Detecting whether the illuminance values at the central points of all grids in the space after the lamp is turned on meet the illuminance requirement values, and if not, calculating a penalty function U (N), wherein the penalty function U (N) is defined as:
U(N)=E(N)+C
Wherein, C is a punishment term, the value of which is a larger positive integer,
(6) Determining and recording the optimal p best of each particle individual and the optimal g best of the population,
(7) Updating the particle velocity v i and the position x i of the population, which are defined as:
Where D is the current search dimension, d=1, 2. I is the ith particle in the population, k is the kth generation population, r 1、r2 is a random number;
(8) Judging whether the population is converged, if not, repeating the steps (2) - (7) until the population is converged;
(9) Outputting a population optimal individual g best;
S5, checking whether the current arrangement form meets the illumination requirements of all areas, if so, performing low-carbon energy-saving self-adaptive correction, and if not, performing compliance self-adaptive correction.
S6, correcting the number of the self-adaptive lamps. Comprising the following steps:
Compliance-based adaptive correction, see fig. 5:
(6011) Initializing related parameters of an adaptive mechanism, wherein the related parameters specifically comprise an adaptive level CL=1, an adjustment amplitude DR=2 CL-1, an adaptive adjustment frequency C=0 and an adjustment level change threshold T;
(6012) C=c+i, where i is the i-th execution of the adaptive luminaire number correction;
(6013) Judging the magnitude relation between the current self-adaptive adjustment times C and the adjustment level change threshold T, and when C is greater than or equal to T and the optimization result of the current state meets the illumination requirements of all areas, adjusting the current self-adaptive level CL to be CL=CL+1, and updating the adjustment amplitude DR, wherein DR=2 CL-1;
(6014) Judging the magnitude relation between the current self-adaptive adjustment times C and the adjustment level change threshold T, and when C is smaller than T, not adjusting the current self-adaptive level CL, and updating the adjustment amplitude DR, wherein DR=2 CL-1;
(6015) According to the adjustment amplitude and the lamp arrangement type, the number of the existing lamps is adjusted, and the specific method is that N=N+DR.
Low-carbon energy-saving adaptive correction, see fig. 7:
(6021) Initializing related parameters of an adaptive mechanism, wherein the related parameters specifically comprise an adaptive level CL=1, an adjustment amplitude DR=2 CL-1, an adaptive adjustment frequency C=0 and an adjustment level change threshold T;
(6022) C=c+i, where i is the i-th execution of the adaptive luminaire number correction;
(6023) Judging the magnitude relation between the current self-adaptive adjustment times C and the adjustment level change threshold T, and when C is greater than or equal to T and the optimization result of the current state meets the illumination requirements of all areas, adjusting the current self-adaptive level CL to be CL=CL+1, and updating the adjustment amplitude DR, wherein DR=2 CL-1;
(6024) Judging the magnitude relation between the current self-adaptive adjustment times C and the adjustment level change threshold T, and when C is smaller than T, not adjusting the current self-adaptive level CL, and updating the adjustment amplitude DR, wherein DR=2 CL-1;
(6025) According to the adjustment amplitude and the lamp arrangement type, the number of the existing lamps is adjusted, and the specific method is that N=N-DR.
And S7, optimizing the arrangement form of the lamp after the self-adaptive correction based on a standard particle swarm algorithm.
S8, for the adaptive correction of the compliance, repeating the steps S5-S7 until the illumination requirements of all areas are met, finishing the dimension adaptive optimizing process, and obtaining the final result by the last iteration parameter and the optimizing result which meet the illumination requirements of all areas,
And (5) repeating the steps S5-S7 for low-carbon energy-saving self-adaptive correction until the illumination requirements of all areas cannot be met, completing the dimension self-adaptive optimizing process, and obtaining a final result after the last iteration parameter and the optimizing result of the illumination requirements of all areas are met.
The above examples are only intended to illustrate the computational process of the present invention and are not intended to be limiting. Although the invention has been described in detail with reference to the foregoing examples, it will be understood by those skilled in the art that the calculations described in the foregoing examples may be modified or equivalents substituted for some of the parameters thereof without departing from the spirit and scope of the calculation method of the invention.
The invention is not limited to the embodiments described above. The above description of specific embodiments is intended to describe and illustrate the technical aspects of the present invention, and is intended to be illustrative only and not limiting. Numerous specific modifications can be made by those skilled in the art without departing from the spirit of the invention and scope of the claims, which are within the scope of the invention.