CN116205391A - Distance optimization method, device, computer equipment and storage medium for vehicle route - Google Patents
Distance optimization method, device, computer equipment and storage medium for vehicle route Download PDFInfo
- Publication number
- CN116205391A CN116205391A CN202310181879.3A CN202310181879A CN116205391A CN 116205391 A CN116205391 A CN 116205391A CN 202310181879 A CN202310181879 A CN 202310181879A CN 116205391 A CN116205391 A CN 116205391A
- Authority
- CN
- China
- Prior art keywords
- target
- target vehicle
- transmission
- distance
- station
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
- G06Q10/047—Optimisation of routes or paths, e.g. travelling salesman problem
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
- G06Q30/0645—Rental transactions; Leasing transactions
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Human Resources & Organizations (AREA)
- Accounting & Taxation (AREA)
- Economics (AREA)
- Marketing (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Development Economics (AREA)
- Finance (AREA)
- Entrepreneurship & Innovation (AREA)
- Game Theory and Decision Science (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- Traffic Control Systems (AREA)
Abstract
The application relates to a distance optimization method, a distance optimization device, computer equipment and a storage medium for a vehicle route. The method comprises the following steps: acquiring position information of a plurality of target vehicles, position information of a target station and transmission cost information of each target vehicle to the target station, and determining a distance constraint value of the target vehicles; for each target vehicle, calculating an initial transmission solution of the target vehicle to the target station based on the position information of the target vehicle, the position information of the target station and the transmission cost information of the target vehicle to the target station, and calculating the transmission cost value of the initial transmission solution of the target vehicle; updating parameter values of the distance constraint optimal transmission algorithm corresponding to each target vehicle, and returning to the steps until a preset iteration condition is met; and determining the target route information and the target distance from the target vehicle to the target station based on the initial transmission solution corresponding to the minimum transmission cost value. By adopting the method, the transmission distance of the target transmission route can be shortened.
Description
Technical Field
The present application relates to the field of artificial intelligence, and in particular, to a method, an apparatus, a computer device, and a storage medium for optimizing a distance of a vehicle route.
Background
With the development of the shared automobile, the transportation of the shared automobile is becoming an important research in the field, and users often cannot find the most suitable automobile returning station so as to detour, navigate or return the automobile to the place where the automobile is returned, so that a great amount of transportation pressure is provided for the users to rent the shared automobile. Therefore, how to shorten the distance that the vehicle transmits has been the focus of research.
In practical application, the conventional optimal transmission method follows the principle of 'lowest cost', and the transmission mode with the shortest time for the target vehicle to be transmitted to the target station is searched to be used as the optimal transmission solution of the target vehicle, so that no requirement is imposed on the transmission distance from the target vehicle to the target station. So that the transmission distance between the target vehicle and the target station may be far, resulting in a far distance of the target transmission solution.
Disclosure of Invention
Based on this, it is necessary to provide a distance optimizing method, an apparatus, a computer device, a computer readable storage medium and a computer program product of a vehicle route in view of the above technical problems.
In a first aspect, the present application provides a distance optimization method for a vehicle route. The method comprises the following steps:
acquiring position information of a plurality of target vehicles, position information of a target station and transmission cost information of each target vehicle to the target station;
determining a distance constraint value of each target vehicle according to the position information of each target vehicle and the position information of the target station;
calculating an initial transmission solution of the target vehicle to the target station through a distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station and the transmission cost information of the target vehicle to the target station for each target vehicle, and calculating the transmission cost value of the initial transmission solution of the target vehicle according to the initial transmission solution of the target vehicle and the distance constraint value of the target vehicle;
updating the parameter value of the distance constraint optimal transmission algorithm corresponding to each target vehicle through the parameter value of the distance constraint optimal transmission algorithm corresponding to the minimum transmission cost value, and returning to execute an initial transmission solution step from the target vehicle to the target station through the distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station and the transmission cost information from the target vehicle to the target station until a preset iteration condition is met;
And determining target route information of the target vehicle to the target station and a target distance of the target vehicle to the target station based on the initial transmission solution corresponding to the minimum transmission cost value in the transmission cost values of all the initial transmission solutions of the target vehicle.
Optionally, the determining the distance constraint value of the target vehicle according to the position information of each target vehicle and the position information of the target station includes:
determining the transmission distance between each target vehicle and the target station according to the position information of the target vehicle and the position information of the target station;
and determining a distance constraint value of the target vehicle according to the transmission distance between the target vehicle and the target station.
Optionally, the calculating the transmission cost value of the initial transmission solution of the target vehicle according to each initial transmission solution of the target vehicle and the distance constraint value of the target vehicle includes:
determining the distance cost value of the target vehicle based on the distance constraint value of the target vehicle and the transmission cost algorithm;
calculating a cost value of each initial transmission solution by a transmission cost algorithm;
And determining the transmission cost value of the initial transmission solution according to the cost value of the initial transmission solution and the distance cost value of the target vehicle.
Optionally, the method further comprises:
respectively calculating an evaluation value of an optimal transmission solution of each target vehicle through an evaluation function;
selecting a target optimal transmission solution corresponding to each evaluation value larger than a preset evaluation threshold value from each evaluation value;
inputting the distance constraint optimal transmission algorithm, training the distance constraint optimal transmission algorithm to obtain an optimized distance constraint optimal transmission algorithm, wherein the distance constraint optimal transmission algorithm comprises a target optimal transmission solution, a first target vehicle corresponding to the target optimal transmission solution, a first target station corresponding to the target optimal transmission solution and transmission cost information from the first target vehicle to the first target station.
Optionally, replacing the parameter value of the distance constraint optimal transmission algorithm with the parameter value of the distance constraint optimal transmission algorithm corresponding to the minimum transmission cost value in the transmission cost values of all initial transmission solutions of the target vehicle further includes:
and inputting the distance cost values of all the target vehicles and the cost values of the initial transmission solutions of all the target vehicles into the transmission cost algorithm, and training the parameter values of the transmission cost algorithm to obtain an optimized transmission cost algorithm.
Optionally, before calculating the initial transmission solution from the target vehicle to the target station according to the distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station, and the transmission cost information of the target vehicle to the target station, the method further includes:
calculating the transmission distance from each target vehicle to the target station according to the position information of each target vehicle and the position information of the target station;
conducting derivation processing on the transmission distance to obtain a distance constraint parameter value;
and adding the distance constraint parameter value to an initial distance constraint optimal transmission algorithm to obtain a distance constraint optimal transmission algorithm corresponding to the target vehicle.
In a second aspect, the present application also provides a distance optimizing apparatus for a vehicle route. The device comprises:
the acquisition module is used for acquiring the position information of a plurality of target vehicles, the position information of the target station and the transmission cost information of each target vehicle to the target station;
the determining module is used for determining a distance constraint value of each target vehicle according to the position information of the target vehicle and the position information of the target station;
The calculation module is used for calculating an initial transmission solution of the target vehicle to the target station through a distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station and the transmission cost information of the target vehicle to the target station for each target vehicle, and calculating the transmission cost value of the initial transmission solution of the target vehicle according to the initial transmission solution of the target vehicle and the distance constraint value of the target vehicle;
the iteration module is used for updating the parameter value of the distance constraint optimal transmission algorithm corresponding to each target vehicle through the parameter value of the distance constraint optimal transmission algorithm corresponding to the minimum transmission cost value, and returning to execute the initial transmission solution step from the target vehicle to the target station through the distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station and the transmission cost information of the target vehicle to the target station until the preset iteration condition is met;
the output module is used for determining the target route information of the target vehicle to the target station and the target distance of the target vehicle to the target station based on the initial transmission solution corresponding to the minimum transmission cost value in the transmission cost values of all the initial transmission solutions of the target vehicle.
Optionally, the determining module is specifically configured to:
determining the transmission distance between each target vehicle and the target station according to the position information of the target vehicle and the position information of the target station;
and determining a distance constraint value of the target vehicle according to the transmission distance between the target vehicle and the target station.
Optionally, the computing module is specifically configured to:
determining the distance cost value of the target vehicle based on the distance constraint value of the target vehicle and the transmission cost algorithm;
calculating a cost value of each initial transmission solution by a transmission cost algorithm;
and determining the transmission cost value of the initial transmission solution according to the cost value of the initial transmission solution and the distance cost value of the target vehicle.
Optionally, the apparatus further includes:
the evaluation module is used for calculating an evaluation value of an optimal transmission solution of each target vehicle through an evaluation function;
the screening module is used for selecting a target optimal transmission solution corresponding to each evaluation value larger than a preset evaluation threshold value from the evaluation values;
the training module is used for inputting the distance constraint optimal transmission algorithm, the first target vehicles corresponding to the target optimal transmission solutions, the first target stations corresponding to the target optimal transmission solutions and the transmission cost information from the first target vehicles to the first target stations, and training the distance constraint optimal transmission algorithm to obtain the optimized distance constraint optimal transmission algorithm.
Optionally, the apparatus further includes:
and the optimization module is used for inputting the distance cost values of all the target vehicles and the cost values of the initial transmission solutions of all the target vehicles into the transmission cost algorithm, and training the parameter values of the transmission cost algorithm to obtain an optimized transmission cost algorithm.
Optionally, the apparatus includes:
the distance calculation module is used for calculating the transmission distance from each target vehicle to the target station according to the position information of each target vehicle and the position information of the target station;
the deriving module is used for deriving the transmission distance to obtain a distance constraint parameter value;
and the adding module is used for adding the distance constraint parameter value to an initial distance constraint optimal transmission algorithm to obtain a distance constraint optimal transmission algorithm corresponding to the target vehicle.
In a third aspect, the present application provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the method of any of the first aspects when the processor executes the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium. On which a computer program is stored which, when being executed by a processor, implements the steps of the method of any of the first aspects.
In a fifth aspect, the present application provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any of the first aspects.
The distance optimizing method, the device, the computer equipment and the storage medium for the vehicle route are used for acquiring the position information of a plurality of target vehicles, the position information of a target station and the transmission cost information from each target vehicle to the target station; determining a distance constraint value of each target vehicle according to the position information of each target vehicle and the position information of the target station; calculating an initial transmission solution of the target vehicle to the target station through a distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station and the transmission cost information of the target vehicle to the target station for each target vehicle, and calculating the transmission cost value of the initial transmission solution of the target vehicle according to the initial transmission solution of the target vehicle and the distance constraint value of the target vehicle; updating the parameter value of the distance constraint optimal transmission algorithm corresponding to each target vehicle through the parameter value of the distance constraint optimal transmission algorithm corresponding to the minimum transmission cost value, and returning to execute an initial transmission solution step from the target vehicle to the target station through the distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station and the transmission cost information from the target vehicle to the target station until a preset iteration condition is met; and determining target route information of the target vehicle to the target station and a target distance of the target vehicle to the target station based on the initial transmission solution corresponding to the minimum transmission cost value in the transmission cost values of all the initial transmission solutions of the target vehicle. The transmission cost value of the initial transmission solution of each target vehicle is determined by calculating the distance constraint value of each target vehicle to the target station through the distance between the target vehicle and the target station, and the iterative trend of the distance constraint optimal transmission algorithm is adjusted according to the transmission cost value, so that the problem that the transmission distance between the target vehicle and the target station is not considered in calculating the distance between the target vehicle and the target station is avoided, and the distance of the target transmission route is shortened.
Drawings
FIG. 1 is a flow diagram of a method of distance optimization of a vehicle route in one embodiment;
FIG. 2 is a flow chart illustrating steps for determining a distance constraint optimal transmission algorithm in one embodiment;
FIG. 3 is a flow chart of a method of distance optimization of a vehicle route in another embodiment;
FIG. 4 is a block diagram of a distance optimizing apparatus for a vehicle course in one embodiment;
fig. 5 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The distance optimization method for the vehicle route, provided by the embodiment of the application, can be applied to a terminal, a server and a system comprising the terminal and the server, and is realized through interaction of the terminal and the server. The terminal may include, but is not limited to, various personal computers, notebook computers, tablet computers, and the like. The terminal calculates the distance constraint value of each target vehicle to the target station through the distance of the target vehicle to the target station, thereby determining the transmission cost value of the initial transmission solution of each target vehicle, and adjusting the iterative trend of the distance constraint optimal transmission algorithm according to the transmission cost value, thereby avoiding the problem that the transmission distance between the target vehicle and the target station is not considered in calculating the transmission distance between the target vehicle and the target station, and further shortening the distance of the target transmission route.
In one embodiment, as shown in fig. 1, there is provided a distance optimizing method for a vehicle route, which is described by taking a terminal as an example, and includes the following steps:
step S101, acquiring position information of a plurality of target vehicles, position information of a target station, and transmission cost information of each target vehicle to the target station.
In this embodiment, the terminal acquires the position information of a plurality of target vehicles, the position information of the target station, and the transmission cost information of each target vehicle to the target station in response to the upload information operation of the user. The target vehicle is an object to be transmitted, and the target station is an object at a position where a destination to be transmitted by the target vehicle is located, for example, the target vehicle may be a vehicle, and the target station may be a target station. The transmission cost information from the target vehicle to the target station is transmission cost information from the target vehicle to the target station, wherein the transmission cost information comprises information such as transmission distance, transmission obstacle, transmission route and the like. The position information of the target vehicle and the target station is three-dimensional coordinate information established in a geodetic coordinate system.
Step S102, determining a distance constraint value of the target vehicle according to the position information of each target vehicle and the position information of the target station.
In this embodiment, the terminal calculates the distance constraint value of each target vehicle according to the position information of the target vehicle and the position information of the target station by a distance constraint algorithm. The distance constraint value is an average value of transmission distances from the target vehicle to the target station. The distance constraint value is calculated as follows:
in the above formula, i is the number of the target vehicle, j is the number of the target station, and is also the target vehicle group number, γ ij Representing the amount of substance transferred from target vehicle i to target j, B i,j Indicating the distance of the target vehicle i to the target station j.
Step S103, calculating an initial transmission solution of the target vehicle to the target station through a distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station and the transmission cost information of the target vehicle to the target station for each target vehicle, and calculating the transmission cost value of the initial transmission solution of the target vehicle according to the initial transmission solution of the target vehicle and the distance constraint value of the target vehicle.
In this embodiment, for each target vehicle, the terminal inputs the position information of the target vehicle, the position information of the target station, and the transmission cost information of the target vehicle to the target station into a distance constraint optimal transmission algorithm, calculates a transmission solution of the target vehicle to the target station, and obtains an initial transmission solution of the target vehicle. Likewise, through the above scheme, the terminal obtains an initial transmission solution for each target vehicle. Then, the terminal calculates the transmission cost value of the initial transmission solution of each target vehicle through a transmission cost algorithm. The specific calculation process of the transmission cost value will be described in detail later.
Step S104, updating the parameter values of the distance constraint optimal transmission algorithm corresponding to each target vehicle through the parameter values of the distance constraint optimal transmission algorithm corresponding to the minimum transmission cost value, returning to execute the initial transmission solution step of the target vehicle to the target station through the distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station and the transmission cost information of the target vehicle to the target station until the preset iteration condition is met.
In this embodiment, the terminal selects a parameter value of a distance constraint optimal transmission algorithm corresponding to a minimum transmission cost value from the transmission cost values of each initial transmission solution, and replaces the parameter value of the original distance constraint optimal transmission algorithm. The terminal returns to execute step S102 until a preset iteration condition is satisfied. The preset iteration condition is the preset iteration times of the terminal.
Step S105, determining the target route information from the target vehicle to the target station and the target distance from the target vehicle to the target station based on the initial transmission solution corresponding to the minimum transmission cost value among the transmission cost values of all the initial transmission solutions of the target vehicle.
In this embodiment, the terminal uses the initial transmission solution corresponding to the minimum transmission cost value among the transmission cost values of all the initial transmission solutions of the target vehicle as the optimal transmission solution of the target vehicle. Likewise, through the scheme, the terminal obtains the optimal transmission solutions of all the target vehicles. For each target vehicle, the terminal uses the transmission route information in the optimal transmission solution of the target vehicle to the target station as the target route information of the target vehicle to the target station. And the terminal calculates the transmission distance of the target route information to obtain the target distance from the target vehicle to the target station.
Based on the scheme, the distance constraint value of each target vehicle to the target station is calculated through the distance of the target vehicle to the target station, so that the transmission cost value of the initial transmission solution of each target vehicle is determined, and the iterative trend of the distance constraint optimal transmission algorithm is adjusted according to the transmission cost value, so that the problem that the transmission distance between the target vehicle and the target station is not considered in calculating the distance between the target vehicle and the target station is avoided, and the distance of the target transmission route is shortened.
Optionally, determining the distance constraint value of the target vehicle according to the position information of each target vehicle and the position information of the target station includes: determining the transmission distance between the target vehicle and the target station according to the position information of the target vehicle and the position information of the target station for each target vehicle; and determining a distance constraint value of the target vehicle according to the transmission distance between the target vehicle and the target station.
In this embodiment, the terminal connects, for each target vehicle, the position information of the target vehicle and the position information of the target station, and obtains the transmission distance between the target vehicle and the target station. And the terminal calculates a distance constraint value of the target vehicle through a distance constraint algorithm according to the transmission distance between the target vehicle and the target station. Likewise, through the scheme, the terminal obtains the distance constraint value of each target vehicle
Based on the scheme, the distance constraint value of the target vehicle is calculated by calculating the position information of the target vehicle and the position information of the target station, so that a data basis is provided for the initial transmission solution of the follow-up screening.
Optionally, calculating the transmission cost value of the initial transmission solution of the target vehicle according to each initial transmission solution of the target vehicle and the distance constraint value of the target vehicle includes: determining the distance cost value of the target vehicle based on the distance constraint value of the target vehicle and a transmission cost algorithm; calculating a cost value of each initial transmission solution by a transmission cost algorithm; and determining the transmission cost value of the initial transmission solution according to the cost value of the initial transmission solution and the distance cost value of the target vehicle.
In this embodiment, for each target vehicle, the terminal calculates the distance constraint value of the target vehicle by inputting the distance constraint value into the transmission cost algorithm, and obtains the distance cost value of the target vehicle. And the terminal inputs the initial transmission solution of the target vehicle into a transmission cost algorithm, and calculates the initial transmission solution to obtain the transmission cost value of the initial transmission solution. Similarly, through the steps, the terminal calculates the transmission cost of each target vehicle and each initial transmission solution, and obtains the transmission cost value of each initial transmission solution and the distance cost value of each target vehicle. And the terminal sums the cost value of each initial transmission solution and the cost value of the target vehicle for each target vehicle to obtain the transmission cost value of the initial transmission solution. The distance cost value of the target vehicle is a negative number, and the cost value of the initial transmission solution is a positive number.
The formula of the transmission cost algorithm is as follows:
in the above formula, gamma * For the transmission cost value of the initial transmission solution, M is transmission cost information from the target vehicle to the station, Ω is a preset regularization term, λ is a preset regularization term coefficient, and C is a constant parameter. i represents the dispersion of the target vehicle and j represents the initial transmission solution of the target vehicle to the station. Wherein i and j are selected during different operations, for example, when calculating the cost value of the target vehicle, the algorithm does not include the content of j, and when calculating the cost value of the initial transmission solution, the algorithm does not include the content of i.
Based on the scheme, the transmission cost value of each initial transmission solution is calculated through the distance constraint value of the target vehicle and the initial transmission solution, and reference data is provided for the distance constraint optimal transmission algorithm in the subsequent adjustment iteration, so that the accuracy of the calculated optimal transmission solution is improved.
Optionally, the method further comprises: respectively calculating an evaluation value of an optimal transmission solution of each target vehicle through an evaluation function; selecting a target optimal transmission solution corresponding to each evaluation value larger than a preset evaluation threshold value from the evaluation values; and inputting the optimal transmission solution of each target, the first target vehicle corresponding to each optimal transmission solution of each target, the first target station corresponding to each optimal transmission solution of each target and the transmission cost information from each first target vehicle to the first target station, inputting a distance constraint optimal transmission algorithm, and training the distance constraint optimal transmission algorithm to obtain an optimized distance constraint optimal transmission algorithm.
In this embodiment, the terminal evaluates the threshold value, and calculates, for each target vehicle, an evaluation value of an optimal transmission solution of the target vehicle by an evaluation function. And the terminal screens an optimal transmission solution corresponding to an evaluation value larger than a preset evaluation threshold value from the evaluation values of the optimal transmission solutions of each target vehicle, takes the target vehicle corresponding to the target transmission solution as a first target vehicle, and takes a target station corresponding to the target optimal transmission solution as a first target station. The terminal inputs the optimal transmission solution of each target, the first target vehicle corresponding to each optimal transmission solution of each target, the first target station corresponding to each optimal transmission solution of each target and the transmission cost information from each first target vehicle to the first target station, inputs the optimal transmission algorithm of distance constraint, and trains the optimal transmission algorithm of distance constraint to obtain the optimal transmission algorithm of optimized distance constraint. Wherein the evaluation function is any one of the evaluation functions capable of realizing the above operation.
Based on the scheme, the calculation accuracy of the distance constraint optimal transmission algorithm is improved by optimizing the distance constraint optimal transmission algorithm.
Optionally, replacing the parameter value of the distance constraint optimal transmission algorithm with the parameter value of the distance constraint optimal transmission algorithm corresponding to the minimum transmission cost value in the transmission cost values of all initial transmission solutions of the target vehicle further includes:
and inputting the distance cost value of all the target vehicles and the cost value of the initial transmission solution of all the target vehicles into a transmission cost algorithm, and training the parameter value of the transmission cost algorithm to obtain an optimized transmission cost algorithm.
In this embodiment, the terminal inputs the distance cost values of all the target vehicles and the cost values of the initial transmission solutions of all the target vehicles into the transmission cost algorithm, and trains the parameter values of the transmission cost algorithm, where the training mode may be, but is not limited to, any algorithm training mode, and the patent does not extend and describe. And the terminal brings the trained parameter value into a source transmission cost algorithm to obtain an optimized transmission cost algorithm.
Based on the scheme, the accuracy and the practicability of the transmission cost algorithm are improved by training the parameter values of the transmission cost algorithm.
Optionally, as shown in fig. 2, before calculating, for each target vehicle, an initial transmission solution from the target vehicle to each target station by a distance constraint optimal transmission algorithm based on the position information of the target vehicle, the position information of the target station, and the transmission cost information of the target vehicle to the target station, the method further includes:
step S201, calculating a transmission distance from each target vehicle to the target station according to the position information of each target vehicle and the position information of the target station.
In this embodiment, the terminal calculates, for each target vehicle, a transmission distance from the target vehicle to the target station based on the position information of the target vehicle and the position information of the target station. The transmission distance is a linear distance obtained by connecting two pieces of position information in a geodetic coordinate system. Also, through the above steps, the terminal de-aos the transmission distance of each target vehicle to the target station.
Step S202, conducting derivation processing on the transmission distance to obtain a distance constraint parameter value.
In this embodiment, the terminal performs, for each target vehicle, derivative processing on a transmission distance of the target vehicle, to obtain a distance constraint parameter value. Wherein, the expression of the distance constraint parameter value is as follows:
In the above formula, i is the number of the target vehicle, j is the number of the target station, and is also the target vehicle group number, γ ij Representing the mass of the vehicle in the transmission cost information of the target vehicle i to the target j, B ij Representing the distance from target vehicle i to target station j
And step S203, adding the distance constraint parameter value to the initial distance constraint optimal transmission algorithm to obtain the distance constraint optimal transmission algorithm.
In this embodiment, the terminal adds the distance constraint parameter value obtained in step S202 to the initial distance constraint optimal transmission algorithm to obtain the distance constraint optimal transmission algorithm. The initial distance constraint optimal transmission algorithm is a traditional distance constraint optimal transmission algorithm.
Based on the scheme, the iteration trend of the distance constraint optimal transmission algorithm is adjusted by adding the distance constraint parameter value into the traditional distance constraint optimal transmission algorithm, so that the problem that the transmission distance from the target vehicle to the target station is not considered in calculating the transmission distance from the target vehicle to the target station is avoided, and the transmission distance of the target transmission route is shortened.
The application also provides a distance optimization example of the vehicle route, as shown in fig. 3, and the specific processing procedure comprises the following steps:
Step S301, acquiring position information of a plurality of target vehicles, position information of a target station, and transmission cost information of each target vehicle to the target station.
Step S302, for each target vehicle, determining a transmission distance between the target vehicle and the target station according to the position information of the target vehicle and the position information of the target station.
Step S303, determining a distance constraint value of the target vehicle according to the transmission distance between the target vehicle and the target station.
Step S304, calculating the transmission distance from each target vehicle to the target station according to the position information of each target vehicle and the position information of the target station.
Step S305, conducting derivation processing on the transmission distance to obtain a distance constraint parameter value.
And step S306, adding the distance constraint parameter value to the initial distance constraint optimal transmission algorithm to obtain a distance constraint optimal transmission algorithm corresponding to the target vehicle.
Step S307, for each target vehicle, constrains an optimal transmission algorithm by a distance corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station, and the transmission cost information of the target vehicle to the target station.
Step S308, determining the distance cost value of the target vehicle based on the distance constraint value of the target vehicle and a transmission cost algorithm.
Step S309, for each initial transmission solution, calculating the cost value of the initial transmission solution by a transmission cost algorithm.
Step S310, determining the transmission cost value of the initial transmission solution according to the cost value of the initial transmission solution and the distance cost value of the target vehicle.
Step S311, updating the parameter values of the distance constraint optimal transmission algorithm corresponding to each target vehicle through the parameter values of the distance constraint optimal transmission algorithm corresponding to the minimum transmission cost value, and returning to the execution step S307 until the preset iteration condition is met.
Step S312, determining the target route information from the target vehicle to the target station and the target distance from the target vehicle to the target station based on the initial transmission solution corresponding to the minimum transmission cost value among the transmission cost values of all the initial transmission solutions of the target vehicle.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a distance optimizing device for the vehicle route for realizing the distance optimizing method for the vehicle route. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the distance optimizing device for one or more vehicle routes provided below may refer to the limitation of the distance optimizing method for a vehicle route hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 4, there is provided a distance optimizing apparatus of a vehicle route, including: an acquisition module 410, a determination module 420, a calculation module 430, an iteration module 440, and an output module 450, wherein:
an acquisition module 410, configured to acquire location information of a plurality of target vehicles, location information of a target station, and transmission cost information of each target vehicle to the target station;
a determining module 420, configured to determine a distance constraint value of the target vehicle according to the location information of each target vehicle and the location information of the target station;
a calculating module 430, configured to calculate, for each target vehicle, an initial transmission solution of the target vehicle to the target station through a distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station, and the transmission cost information of the target vehicle to the target station, and calculate a transmission cost value of the initial transmission solution of the target vehicle according to the initial transmission solution of the target vehicle and the distance constraint value of the target vehicle;
The iteration module 440 is configured to update parameter values of a distance constraint optimal transmission algorithm corresponding to each target vehicle by using a parameter value of the distance constraint optimal transmission algorithm corresponding to a minimum transmission cost value, and return to perform an initial transmission solution step from the target vehicle to the target station by using the distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station, and the transmission cost information of the target vehicle to the target station until a preset iteration condition is satisfied;
and the output module 450 is configured to determine, based on an initial transmission solution corresponding to a minimum transmission cost value among the transmission cost values of all initial transmission solutions of the target vehicle, target route information of the target vehicle to the target station and a target distance of the target vehicle to the target station based on an initial transmission solution corresponding to a minimum transmission cost value among the transmission cost values of all initial transmission solutions of the target vehicle.
Optionally, the determining module 420 is specifically configured to:
determining the transmission distance between each target vehicle and the target station according to the position information of the target vehicle and the position information of the target station;
And determining a distance constraint value of the target vehicle according to the transmission distance between the target vehicle and the target station.
Optionally, the computing module 430 is specifically configured to:
determining the distance cost value of the target vehicle based on the distance constraint value of the target vehicle and the transmission cost algorithm;
calculating a cost value of each initial transmission solution by a transmission cost algorithm;
and determining the transmission cost value of the initial transmission solution according to the cost value of the initial transmission solution and the distance cost value of the target vehicle.
Optionally, the apparatus further includes:
the evaluation module is used for calculating an evaluation value of an optimal transmission solution of each target vehicle through an evaluation function;
the screening module is used for selecting a target optimal transmission solution corresponding to each evaluation value larger than a preset evaluation threshold value from the evaluation values;
the training module is used for inputting the distance constraint optimal transmission algorithm, the first target vehicles corresponding to the target optimal transmission solutions, the first target stations corresponding to the target optimal transmission solutions and the transmission cost information from the first target vehicles to the first target stations, and training the distance constraint optimal transmission algorithm to obtain the optimized distance constraint optimal transmission algorithm.
Optionally, the apparatus further includes:
and the optimization module is used for inputting the distance cost values of all the target vehicles and the cost values of the initial transmission solutions of all the target vehicles into the transmission cost algorithm, and training the parameter values of the transmission cost algorithm to obtain an optimized transmission cost algorithm.
Optionally, the apparatus includes:
the distance calculation module is used for calculating the transmission distance from each target vehicle to the target station according to the position information of each target vehicle and the position information of the target station;
the deriving module is used for deriving the transmission distance to obtain a distance constraint parameter value;
and the adding module is used for adding the distance constraint parameter value to an initial distance constraint optimal transmission algorithm to obtain a distance constraint optimal transmission algorithm corresponding to the target vehicle.
The respective modules in the distance optimizing apparatus of the above-described vehicle route may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a distance optimization method for a vehicle route. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method of any of the first aspects when the computer program is executed.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the method of any of the first aspects.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method of any of the first aspects.
It should be noted that, user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.
Claims (10)
1. A method of distance optimization of a vehicle route, the method comprising:
acquiring position information of a plurality of target vehicles, position information of a target station and transmission cost information of each target vehicle to the target station;
determining a distance constraint value of each target vehicle according to the position information of each target vehicle and the position information of the target station;
Calculating an initial transmission solution of the target vehicle to the target station through a distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station and the transmission cost information of the target vehicle to the target station for each target vehicle, and calculating the transmission cost value of the initial transmission solution of the target vehicle according to the initial transmission solution of the target vehicle and the distance constraint value of the target vehicle;
updating the parameter value of the distance constraint optimal transmission algorithm corresponding to each target vehicle through the parameter value of the distance constraint optimal transmission algorithm corresponding to the minimum transmission cost value, and returning to execute an initial transmission solution step from the target vehicle to the target station through the distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station and the transmission cost information from the target vehicle to the target station until a preset iteration condition is met;
and determining target route information of the target vehicle to the target station and a target distance of the target vehicle to the target station based on the initial transmission solution corresponding to the minimum transmission cost value in the transmission cost values of all the initial transmission solutions of the target vehicle.
2. The method according to claim 1, wherein the determining the distance constraint value of the target vehicle based on the position information of each of the target vehicles and the position information of the target station includes:
determining the transmission distance between each target vehicle and the target station according to the position information of the target vehicle and the position information of the target station;
and determining a distance constraint value of the target vehicle according to the transmission distance between the target vehicle and the target station.
3. The method of claim 1, wherein calculating the transmission cost value of the initial transmission solution of the target vehicle based on each initial transmission solution of the target vehicle and the distance constraint value of the target vehicle comprises:
determining the distance cost value of the target vehicle based on the distance constraint value of the target vehicle and the transmission cost algorithm;
calculating a cost value of each initial transmission solution by a transmission cost algorithm;
and determining the transmission cost value of the initial transmission solution according to the cost value of the initial transmission solution and the distance cost value of the target vehicle.
4. The method according to claim 1, wherein the method further comprises:
respectively calculating an evaluation value of an optimal transmission solution of each target vehicle through an evaluation function;
selecting a target optimal transmission solution corresponding to each evaluation value larger than a preset evaluation threshold value from each evaluation value;
inputting the distance constraint optimal transmission algorithm, training the distance constraint optimal transmission algorithm to obtain an optimized distance constraint optimal transmission algorithm, wherein the distance constraint optimal transmission algorithm comprises a target optimal transmission solution, a first target vehicle corresponding to the target optimal transmission solution, a first target station corresponding to the target optimal transmission solution and transmission cost information from the first target vehicle to the first target station.
5. The method according to claim 3, wherein after replacing the parameter value of the distance constraint optimal transmission algorithm with the parameter value of the distance constraint optimal transmission algorithm corresponding to the minimum transmission cost value in the transmission cost values of all initial transmission solutions of the target vehicle, further comprises:
and inputting the distance cost values of all the target vehicles and the cost values of the initial transmission solutions of all the target vehicles into the transmission cost algorithm, and training the parameter values of the transmission cost algorithm to obtain an optimized transmission cost algorithm.
6. The method according to claim 1, wherein before calculating an initial transmission solution of the target vehicle to the target station by a distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station, and the transmission cost information of the target vehicle to the target station, further comprises:
calculating the transmission distance from each target vehicle to the target station according to the position information of each target vehicle and the position information of the target station;
conducting derivation processing on the transmission distance to obtain a distance constraint parameter value;
and adding the distance constraint parameter value to an initial distance constraint optimal transmission algorithm to obtain a distance constraint optimal transmission algorithm corresponding to the target vehicle.
7. A distance optimizing apparatus for a vehicle route, the apparatus comprising:
the acquisition module is used for acquiring the position information of a plurality of target vehicles, the position information of the target station and the transmission cost information of each target vehicle to the target station;
the determining module is used for determining a distance constraint value of each target vehicle according to the position information of the target vehicle and the position information of the target station;
The calculation module is used for calculating an initial transmission solution of the target vehicle to the target station through a distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station and the transmission cost information of the target vehicle to the target station for each target vehicle, and calculating the transmission cost value of the initial transmission solution of the target vehicle according to the initial transmission solution of the target vehicle and the distance constraint value of the target vehicle;
the iteration module is used for updating the parameter value of the distance constraint optimal transmission algorithm corresponding to each target vehicle through the parameter value of the distance constraint optimal transmission algorithm corresponding to the minimum transmission cost value, and returning to execute the initial transmission solution step from the target vehicle to the target station through the distance constraint optimal transmission algorithm corresponding to the target vehicle based on the position information of the target vehicle, the position information of the target station and the transmission cost information of the target vehicle to the target station until the preset iteration condition is met;
the output module is used for determining the target route information of the target vehicle to the target station and the target distance of the target vehicle to the target station based on the initial transmission solution corresponding to the minimum transmission cost value in the transmission cost values of all the initial transmission solutions of the target vehicle.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310181879.3A CN116205391A (en) | 2023-02-21 | 2023-02-21 | Distance optimization method, device, computer equipment and storage medium for vehicle route |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310181879.3A CN116205391A (en) | 2023-02-21 | 2023-02-21 | Distance optimization method, device, computer equipment and storage medium for vehicle route |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116205391A true CN116205391A (en) | 2023-06-02 |
Family
ID=86507431
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310181879.3A Pending CN116205391A (en) | 2023-02-21 | 2023-02-21 | Distance optimization method, device, computer equipment and storage medium for vehicle route |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116205391A (en) |
-
2023
- 2023-02-21 CN CN202310181879.3A patent/CN116205391A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116010226A (en) | Software system reliability simulation evaluation method and device and computer equipment | |
CN117314557A (en) | Recommendation method and device for financial products, computer equipment and storage medium | |
CN116824092A (en) | Three-dimensional model generation method, three-dimensional model generation device, computer equipment and storage medium | |
CN117540915A (en) | Big data technology-based selection scheme generation method, device, equipment and medium | |
CN115859016B (en) | Processor-based operation method, processor-based operation device, computer equipment and storage medium | |
CN116842171A (en) | Article recommendation method, apparatus, computer device and storage medium | |
CN116626504A (en) | Power battery performance determining method, apparatus, computer device and storage medium | |
CN116205391A (en) | Distance optimization method, device, computer equipment and storage medium for vehicle route | |
CN115758271A (en) | Data processing method, data processing device, computer equipment and storage medium | |
CN116205392A (en) | Method, device, computer equipment and storage medium for determining vehicle route | |
CN115601550B (en) | Model determination method, model determination device, computer equipment and computer readable storage medium | |
CN116781536A (en) | Traffic prediction method, traffic prediction device, traffic prediction apparatus, traffic prediction device, traffic prediction program product, and traffic prediction program product | |
CN115310270A (en) | Multi-system integrated simulation method and device, computer equipment and storage medium | |
CN117910627A (en) | Carbon emission prediction method, device, computer equipment and storage medium | |
CN116881543A (en) | Financial resource object recommendation method, device, equipment, storage medium and product | |
CN116049350A (en) | Data retrieval method, device, computer equipment and storage medium | |
CN115660786A (en) | Service recommendation method, device, computer equipment, storage medium and program product | |
CN118051215A (en) | Program generation method, program generation device, computer device, and storage medium | |
CN116205281A (en) | Network model quantization method, device, computer equipment and storage medium thereof | |
CN117319475A (en) | Communication resource recommendation method, device, computer equipment and storage medium | |
CN116719994A (en) | Media object recommendation method, device, computer equipment and storage medium | |
CN117609412A (en) | Spatial object association method and device based on network structure information | |
CN118114947A (en) | Price difference-based power cross-provincial and cross-regional iterative collaborative scheduling method and device | |
CN118115025A (en) | Business target data adjustment method, device, computer equipment, medium and product | |
CN116881122A (en) | Test case generation method, device, equipment, storage medium and program product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |