or-tools

How to feed LP files to the GLOP solver of or-tools?

醉酒当歌 提交于 2021-01-28 07:13:01
问题 I would like to use or-tools and the GLOP solver to solve linear programming problems. I already have another program that creates LP files which are, as far as I know, fairly standard for defining linear programs. Has anyone managed to pass those files directly to GLOP? What file format das GLOP understand and how do I pass them to GLOP? Example lp file: maximize 2x1 + 3x2 - x3 subject to x1 + x2 <= 1 x1 + x2 + x3 <= 0 x2 - 2x3 <= 2 bounds x1 free x2 free x3 free end Edit: I am looking for a

OR-Tools solve traveling salesman (TSP) without returning to the home node

耗尽温柔 提交于 2021-01-27 18:10:19
问题 I'm using Google Or-Tools to solve a Traveling Salesman Problem by using this example (basically I just replaced the distances matrix with mine). As in the example, I set data['depot'] = 0 . For my application it is not important to return to the first node at the end of the path. I can remove the last edge from the solution but I wonder that if I could remove this constraint altogether it might find a better path overall. 回答1: Make sure the distance from all nodes to 0 (the depot) is null.

OR-Tools solve traveling salesman (TSP) without returning to the home node

风流意气都作罢 提交于 2021-01-27 18:01:40
问题 I'm using Google Or-Tools to solve a Traveling Salesman Problem by using this example (basically I just replaced the distances matrix with mine). As in the example, I set data['depot'] = 0 . For my application it is not important to return to the first node at the end of the path. I can remove the last edge from the solution but I wonder that if I could remove this constraint altogether it might find a better path overall. 回答1: Make sure the distance from all nodes to 0 (the depot) is null.

Google ORTools VRPTW with start and end locations for routes

拈花ヽ惹草 提交于 2021-01-24 07:31:43
问题 I have tried to implements start and end locations for routes on VRPTW example following ufficial guide of ortools. in data, i have add: data['starts'] = [1, 2, 15, 16] data['ends'] = [0, 0, 0, 0] And i have changed RoutingIndexManager to: # Create the routing index manager. manager = pywrapcp.RoutingIndexManager( len(data['distance_matrix']), data['num_vehicles'], data['starts'], data['ends']) This is my code after join that instruction with original VRPTW example: from __future__ import

Encountering DLL error in OR Tools pywrapcp

社会主义新天地 提交于 2020-11-25 03:45:44
问题 I used OR Tools V7.4 to build a routing model, it runs perfectly on my computer. However due to some situation I need ir for another team member to run the code. Between me creating the model and giving my team member that responsability OR tools updated to V7.5, and we've faced the issue that he cant import one of the modules in the library. Trying to read de release notes I've not found anything that changes in the modules (names) we have literally the same of everything, but he cant run it

Encountering DLL error in OR Tools pywrapcp

。_饼干妹妹 提交于 2020-11-25 03:43:44
问题 I used OR Tools V7.4 to build a routing model, it runs perfectly on my computer. However due to some situation I need ir for another team member to run the code. Between me creating the model and giving my team member that responsability OR tools updated to V7.5, and we've faced the issue that he cant import one of the modules in the library. Trying to read de release notes I've not found anything that changes in the modules (names) we have literally the same of everything, but he cant run it