Решение задачи транспортной логистики с помощью IBM CPLEX Solver

a8e56b4d69378d6f747fdcf7719acd23.png
cars = {1, 2, 3, 4, 5, 6, 7, 8, 9};
 
points = {1, 2, 3, 4, 5};
 
 StartDateCar = {
 <1, 3, 0>,
 <2, 1, 5>
 <3, 5, 45>
 <4, 2, 0>
 <5, 4, 10>
 <6, 4, 3>
 <7, 2, 4>
 <8, 1, 6>
 <9, 3, 4>
 };
 
// Shipments
 //int shipmentId; 
 //int startShipmentTime; 
 //int stratShipmentPoint; 
 //int shipmentDuration; 
 //int finishShipmentPoint; 

 Shipments = {
 <1, 25, 1, 4, 2>,
 <2, 15, 3, 2, 4>,
 <3, 40, 2, 1, 4>
 <4, 45, 5, 1, 2>
 <5, 10, 4, 2, 1>
 <6, 12, 4, 2, 3>
 <7, 5, 2, 3, 5>
 <8, 45, 5, 1, 2>
 <9, 7, 1, 1, 5>
 <10, 16, 2, 1, 3 >
 <11, 1, 2, 2, 1 >
 <12, 18, 3, 4, 2>
 
 <13, 40, 2, 1, 4>
 <14, 45, 5, 1, 2>
 <15, 10, 4, 2, 1>
 <16, 12, 4, 2, 3>
 <17, 5, 2, 3, 5>
 <18, 45, 5, 1, 2>
 <19, 7, 1, 1, 5>
 <20, 16, 2, 1, 3 >
 <21, 1, 2, 2, 1 >
 <22, 18, 3, 4, 2>
 <23, 14, 3, 2, 1>
 <24, 6, 5, 3, 2>
 <25, 9, 5, 1, 4>
 };
 
 DistanceMatrix = {
 <1,1,0>,<1,2,10>, <1,3, 6>, <1, 4, 19>, <1, 5, 3>
 <2,1,8>,<2,2,0>, <2,3,15>,<2,4,2>, <2, 5, 12>
 <3,1,4>,<3,2,18>,<3,3,0>,<3,4,6>, <3, 5, 17>
  <4,1,17>,<4,2,5>,<4,3,3>,<4,4,0> <4,5, 9>
  <5,1, 3> <5,2, 12><5,3, 17><5,4,9><5,5,0>
 };

© Habrahabr.ru