Package google.maps.routeoptimization.v1

সূচক

রুট অপ্টিমাইজেশান

যানবাহন ট্যুর অপ্টিমাইজ করার জন্য একটি পরিষেবা।

নির্দিষ্ট ধরণের ক্ষেত্রের বৈধতা:

  • google.protobuf.Timestamp
    • সময়গুলি ইউনিক্স সময়ে: 1970-01-01T00:00:00+00:00 থেকে সেকেন্ড।
    • সেকেন্ড অবশ্যই [0, 253402300799], অর্থাৎ [1970-01-01T00:00:00+00:00, 9999-12-31T23:59:59+00:00]-এ হতে হবে।
    • nanos আনসেট বা 0 এ সেট করা আবশ্যক।
  • google.protobuf.Duration
    • সেকেন্ড অবশ্যই [0, 253402300799], অর্থাৎ [1970-01-01T00:00:00+00:00, 9999-12-31T23:59:59+00:00]-এ হতে হবে।
    • nanos আনসেট বা 0 এ সেট করা আবশ্যক।
  • google.type.LatLng
    • অক্ষাংশ অবশ্যই [-90.0, 90.0]-এ হতে হবে।
    • দ্রাঘিমাংশ অবশ্যই [-180.0, 180.0]-এর মধ্যে হতে হবে।
    • অক্ষাংশ এবং দ্রাঘিমাংশের অন্তত একটি অ-শূন্য হতে হবে।
ব্যাচঅপ্টিমাইজ ট্যুরস

rpc BatchOptimizeTours( BatchOptimizeToursRequest ) returns ( Operation )

একটি ব্যাচ হিসাবে এক বা একাধিক OptimizeToursRequest বার্তাগুলির জন্য গাড়ির ট্যুর অপ্টিমাইজ করে৷

এই পদ্ধতিটি একটি লং রানিং অপারেশন (LRO)। অপ্টিমাইজেশনের জন্য ইনপুট ( OptimizeToursRequest বার্তা) এবং আউটপুট ( OptimizeToursResponse বার্তা) ক্লাউড স্টোরেজ থেকে ব্যবহারকারী-নির্দিষ্ট বিন্যাসে পড়া এবং লেখা হয়। OptimizeTours পদ্ধতির মতো, প্রতিটি OptimizeToursRequest একটি ShipmentModel থাকে এবং ShipmentRoute ক্ষেত্রগুলি সম্বলিত একটি OptimizeToursResponse প্রদান করে, যা সামগ্রিক খরচ কমিয়ে যানবাহনের দ্বারা সঞ্চালিত রুটের একটি সেট।

ব্যবহারকারী ভোট operations.get করতে পারেন।

যদি LRO done ক্ষেত্রটি মিথ্যা হয়, তাহলে অন্তত একটি অনুরোধ এখনও প্রক্রিয়া করা হচ্ছে। অন্যান্য অনুরোধগুলি সফলভাবে সম্পন্ন হতে পারে এবং তাদের ফলাফল ক্লাউড স্টোরেজে উপলব্ধ।

যদি LRO এর done ক্ষেত্রটি সত্য হয়, তাহলে সমস্ত অনুরোধ প্রক্রিয়া করা হয়েছে। যেকোনো সফলভাবে প্রক্রিয়াকৃত অনুরোধের ফলাফল ক্লাউড স্টোরেজে পাওয়া যাবে। ব্যর্থ হওয়া যেকোনো অনুরোধের ফলাফল ক্লাউড স্টোরেজে পাওয়া যাবে না। যদি LRO এর error ক্ষেত্রটি সেট করা থাকে, তাহলে এতে ব্যর্থ অনুরোধগুলির একটি থেকে ত্রুটি রয়েছে৷

অনুমোদনের সুযোগ

নিম্নলিখিত OAuth সুযোগ প্রয়োজন:

  • https://www.googleapis.com/auth/cloud-platform
আইএএম অনুমতি

parent রিসোর্সে নিম্নলিখিত IAM অনুমতির প্রয়োজন:

  • routeoptimization.operations.create

আরও তথ্যের জন্য, IAM ডকুমেন্টেশন দেখুন।

অপটিমাইজ ট্যুরস

rpc OptimizeTours( OptimizeToursRequest ) returns ( OptimizeToursResponse )

একটি ShipmentModel সম্বলিত একটি OptimizeToursRequest পাঠায় এবং ShipmentRoute s সম্বলিত একটি OptimizeToursResponse ফেরত দেয়, যা সামগ্রিক খরচ কমিয়ে যানবাহনের দ্বারা সম্পাদিত রুটের একটি সেট।

একটি ShipmentModel মডেল প্রধানত Shipment নিয়ে গঠিত যা চালাতে হবে এবং Vehicle যা Shipment পরিবহনের জন্য ব্যবহার করা যেতে পারে৷ ShipmentRoute Vehicle Shipment বরাদ্দ করে৷ আরও নির্দিষ্টভাবে, তারা প্রতিটি গাড়ির জন্য একটি সিরিজ Visit নির্ধারণ করে, যেখানে একটি Visit একটি VisitRequest সাথে মিলে যায়, যা একটি Shipment জন্য একটি পিকআপ বা ডেলিভারি।

লক্ষ্য হল Vehicle ShipmentRoute একটি অ্যাসাইনমেন্ট প্রদান করা যা মোট খরচ কমিয়ে দেয় যেখানে খরচের অনেকগুলি উপাদান ShipmentModel সংজ্ঞায়িত করা হয়েছে৷

অনুমোদনের সুযোগ

নিম্নলিখিত OAuth সুযোগ প্রয়োজন:

  • https://www.googleapis.com/auth/cloud-platform
আইএএম অনুমতি

parent রিসোর্সে নিম্নলিখিত IAM অনুমতির প্রয়োজন:

  • routeoptimization.locations.use

আরও তথ্যের জন্য, IAM ডকুমেন্টেশন দেখুন।

সমষ্টিগত মেট্রিক্স

ShipmentRoute এর জন্য সমষ্টিগত মেট্রিক্স ( OptimizeToursResponse জন্য সমস্ত Transition এবং/অথবা Visit (সমস্ত ShipmentRoute উপর রেসপন্স) উপাদান।

ক্ষেত্র
performed_ shipment_ count

int32

সঞ্চালিত চালানের সংখ্যা. মনে রাখবেন যে একটি পিকআপ এবং ডেলিভারি জুটি শুধুমাত্র একবার গণনা করা হয়।

travel_ duration

Duration

একটি রুট বা একটি সমাধানের জন্য মোট ভ্রমণের সময়কাল।

wait_ duration

Duration

একটি রুট বা একটি সমাধানের জন্য মোট অপেক্ষার সময়কাল।

delay_ duration

Duration

একটি রুট বা একটি সমাধানের জন্য মোট বিলম্বের সময়কাল।

break_ duration

Duration

একটি রুট বা একটি সমাধানের জন্য মোট বিরতির সময়কাল।

visit_ duration

Duration

একটি রুট বা একটি সমাধানের জন্য মোট পরিদর্শন সময়কাল।

total_ duration

Duration

মোট সময়কাল উপরের সমস্ত সময়কালের যোগফলের সমান হওয়া উচিত। রুটের জন্য, এটি এর সাথেও মিলে যায়:

[ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] - [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]
travel_ distance_ meters

double

একটি রুট বা একটি সমাধানের জন্য মোট ভ্রমণ দূরত্ব।

max_ loads

map<string, VehicleLoad >

এই রুটের প্রতিটি পরিমাণের জন্য (resp. সমাধান) সমগ্র রুটে অর্জিত সর্বাধিক লোড (resp. solution), সমস্ত Transition.vehicle_loads (resp. ShipmentRoute.metrics.max_loads ) এর উপর সর্বাধিক হিসাবে গণনা করা হয়েছে।

BatchOptimizeToursMetadata

এই ধরনের কোন ক্ষেত্র আছে.

BatchOptimizeToursRequest কলের জন্য অপারেশন মেটাডেটা।

BatchOptimizeToursRequest

একটি অ্যাসিঙ্ক্রোনাস অপারেশন হিসাবে ব্যাচ অপ্টিমাইজ ট্যুর করার অনুরোধ। প্রতিটি ইনপুট ফাইলে একটি OptimizeToursRequest থাকা উচিত এবং প্রতিটি আউটপুট ফাইলে একটি OptimizeToursResponse থাকবে। অনুরোধে ফাইলগুলি পড়া/লেখা এবং পার্স করার তথ্য রয়েছে। সমস্ত ইনপুট এবং আউটপুট ফাইল একই প্রকল্পের অধীনে হওয়া উচিত।

ক্ষেত্র
parent

string

প্রয়োজন। একটি কল করতে লক্ষ্য প্রকল্প এবং অবস্থান.

বিন্যাস: * projects/{project-id} * projects/{project-id}/locations/{location-id}

কোনো অবস্থান নির্দিষ্ট না থাকলে, একটি অঞ্চল স্বয়ংক্রিয়ভাবে বেছে নেওয়া হবে।

model_ configs[]

AsyncModelConfig

প্রয়োজন। প্রতিটি ক্রয় মডেলের ইনপুট/আউটপুট তথ্য, যেমন ফাইল পাথ এবং ডেটা ফরম্যাট।

AsyncModelConfig

অসিঙ্ক্রোনাসভাবে একটি অপ্টিমাইজেশন মডেল সমাধানের জন্য তথ্য।

ক্ষেত্র
display_ name

string

ঐচ্ছিক। ব্যবহারকারীর সংজ্ঞায়িত মডেল নাম, মডেলের ট্র্যাক রাখতে ব্যবহারকারীদের দ্বারা উপনাম হিসাবে ব্যবহার করা যেতে পারে।

input_ config

InputConfig

প্রয়োজন। ইনপুট মডেল সম্পর্কে তথ্য।

output_ config

OutputConfig

প্রয়োজন। পছন্দসই আউটপুট অবস্থান তথ্য.

BatchOptimizeToursResponse

এই ধরনের কোন ক্ষেত্র আছে.

একটি BatchOptimizeToursRequest এর প্রতিক্রিয়া। অপারেশন সম্পূর্ণ হওয়ার পর এটি লং রানিং অপারেশনে ফিরিয়ে দেওয়া হয়।

BreakRule

একটি যানবাহনের জন্য সময় বিরতি তৈরি করার নিয়ম (যেমন লাঞ্চ বিরতি)। একটি বিরতি হল একটি সংলগ্ন সময়কাল যেখানে যানবাহনটি তার বর্তমান অবস্থানে নিষ্ক্রিয় থাকে এবং কোনও পরিদর্শন করতে পারে না। একটি বিরতি ঘটতে পারে:

  • দুটি ভিজিটের মধ্যে ভ্রমণের সময় (যার মধ্যে একটি ভিজিটের আগে বা ঠিক পরে সময় থাকে, তবে ভিজিটের মাঝখানে নয়), এই ক্ষেত্রে এটি ভিজিটের মধ্যে সংশ্লিষ্ট ট্রানজিট সময়কে প্রসারিত করে,
  • বা যানবাহন শুরু হওয়ার আগে (একটি বিরতির মাঝখানে যানবাহন শুরু নাও হতে পারে), এই ক্ষেত্রে এটি গাড়ির শুরুর সময়কে প্রভাবিত করে না।
  • বা যানবাহন শেষ হওয়ার পরে (এভাবে, গাড়ির শেষ সময় সহ)।
ক্ষেত্র
break_ requests[]

BreakRequest

বিরতির ক্রম। BreakRequest বার্তাটি দেখুন।

frequency_ constraints[]

FrequencyConstraint

বেশ কিছু FrequencyConstraint প্রযোজ্য হতে পারে। এই BreakRule এর BreakRequest s দ্বারা তাদের সকলকে অবশ্যই সন্তুষ্ট হতে হবে। FrequencyConstraint দেখুন।

ব্রেক রিকোয়েস্ট

বিরতির ক্রম (অর্থাৎ তাদের সংখ্যা এবং ক্রম) যা প্রতিটি গাড়ির জন্য প্রযোজ্য তা অবশ্যই আগে থেকেই জানা উচিত। পুনরাবৃত্ত BreakRequest গুলি সেই ক্রমটিকে সংজ্ঞায়িত করে, যে ক্রমে সেগুলি ঘটতে হবে৷ তাদের সময় উইন্ডো ( earliest_start_time / latest_start_time ) ওভারল্যাপ হতে পারে, কিন্তু সেগুলি অবশ্যই অর্ডারের সাথে সামঞ্জস্যপূর্ণ হতে হবে (এটি চেক করা হয়েছে)।

ক্ষেত্র
earliest_ start_ time

Timestamp

প্রয়োজন। বিরতির শুরুতে লোয়ার বাউন্ড (অন্তর্ভুক্ত)।

latest_ start_ time

Timestamp

প্রয়োজন। বিরতির শুরুতে আপার বাউন্ড (ইনক্লুসিভ)।

min_ duration

Duration

প্রয়োজন। বিরতির ন্যূনতম সময়কাল। ইতিবাচক হতে হবে।

ফ্রিকোয়েন্সি সীমাবদ্ধতা

একটি ন্যূনতম বিরতির ফ্রিকোয়েন্সি প্রয়োগ করে উপরে উল্লেখিত বিরতির ফ্রিকোয়েন্সি এবং সময়কালকে আরও সীমাবদ্ধ করতে পারে, যেমন "প্রতি 12 ঘন্টায় কমপক্ষে 1 ঘন্টা বিরতি থাকতে হবে"। ধরে নিলাম যে এটিকে "12 ঘন্টার যেকোনো স্লাইডিং টাইম উইন্ডোর মধ্যে, কমপক্ষে এক ঘন্টার একটি বিরতি থাকতে হবে" হিসাবে ব্যাখ্যা করা যেতে পারে, এই উদাহরণটি নিম্নলিখিত FrequencyConstraint অনুবাদ করবে:

{
   min_break_duration { seconds: 3600 }         # 1 hour.
   max_inter_break_duration { seconds: 39600 }  # 11 hours (12 - 1 = 11).
}

সমাধানে বিরতির সময় এবং সময়কাল এই ধরনের সমস্ত সীমাবদ্ধতাকে সম্মান করবে, BreakRequest এ ইতিমধ্যে নির্দিষ্ট করা সময় উইন্ডো এবং ন্যূনতম সময়কাল ছাড়াও।

একটি FrequencyConstraint অনুশীলনে অ-পরপর বিরতিতে প্রযোজ্য হতে পারে। উদাহরণস্বরূপ, নিম্নলিখিত সময়সূচী "প্রতি 12 ঘন্টা" উদাহরণকে সম্মান করে:

  04:00 vehicle start
   .. performing travel and visits ..
  09:00 1 hour break
  10:00 end of the break
   .. performing travel and visits ..
  12:00 20-min lunch break
  12:20 end of the break
   .. performing travel and visits ..
  21:00 1 hour break
  22:00 end of the break
   .. performing travel and visits ..
  23:59 vehicle end
ক্ষেত্র
min_ break_ duration

Duration

প্রয়োজন। এই সীমাবদ্ধতার জন্য ন্যূনতম বিরতির সময়কাল। নেতিবাচক। FrequencyConstraint কনস্ট্রেন্টের বিবরণ দেখুন।

max_ inter_ break_ duration

Duration

প্রয়োজন। রুটের যেকোনো সময়ের ব্যবধানের সর্বাধিক অনুমোদিত স্প্যান যা অন্তত আংশিকভাবে duration >= min_break_duration । ইতিবাচক হতে হবে।

ডেটা ফরম্যাট

ইনপুট এবং আউটপুট ফাইলের জন্য ডেটা বিন্যাস।

Enums
DATA_FORMAT_UNSPECIFIED অবৈধ মান, বিন্যাস অবশ্যই অনির্দিষ্ট হওয়া উচিত নয়৷
JSON জাভাস্ক্রিপ্ট অবজেক্ট নোটেশন।
PROTO_TEXT প্রোটোকল বাফার টেক্সট ফরম্যাট। https://protobuf.dev/reference/protobuf/textformat-spec/ দেখুন

দূরত্বসীমা

ভ্রমণ করা যেতে পারে এমন একটি সর্বোচ্চ দূরত্ব সংজ্ঞায়িত করে। এটা শক্ত বা নরম হতে পারে।

যদি একটি নরম সীমা সংজ্ঞায়িত করা হয়, তাহলে soft_max_meters এবং cost_per_kilometer_above_soft_max উভয়কেই সংজ্ঞায়িত করতে হবে এবং অঋণাত্মক হতে হবে।

ক্ষেত্র
max_ meters

int64

একটি কঠিন সীমা যা দূরত্বকে সর্বাধিক max_meters হতে বাধা দেয়৷ সীমাটি অবশ্যই নেতিবাচক হতে হবে।

soft_ max_ meters

int64

একটি নরম সীমা সর্বোচ্চ দূরত্বের সীমা বলবৎ করে না, কিন্তু লঙ্ঘন করলে একটি খরচ হয় যা একই ইউনিটের সাথে মডেলে সংজ্ঞায়িত অন্যান্য খরচের সাথে যোগ করে।

যদি সংজ্ঞায়িত করা হয় soft_max_meters অবশ্যই max_meters এর থেকে কম হতে হবে এবং অবশ্যই nonnegative হতে হবে।

cost_ per_ kilometer_ below_ soft_ max

double

প্রতি কিলোমিটার খরচ, সূত্র সহ soft_max_meters পর্যন্ত বৃদ্ধি পাচ্ছে:

  min(distance_meters, soft_max_meters) / 1000.0 *
  cost_per_kilometer_below_soft_max.

এই খরচ route_distance_limit সমর্থিত নয়।

cost_ per_ kilometer_ above_ soft_ max

double

দূরত্ব soft_max_meters সীমার উপরে হলে প্রতি কিলোমিটার খরচ। দূরত্ব সীমার নিচে থাকলে অতিরিক্ত খরচ 0 হয়, অন্যথায় খরচ গণনা করার জন্য ব্যবহৃত সূত্রটি নিম্নরূপ:

  (distance_meters - soft_max_meters) / 1000.0 *
  cost_per_kilometer_above_soft_max.

খরচ nonnegative হতে হবে.

Gcs গন্তব্য

Google ক্লাউড স্টোরেজের অবস্থান যেখানে আউটপুট ফাইল(গুলি) লেখা হবে৷

ক্ষেত্র
uri

string

প্রয়োজন। Google ক্লাউড স্টোরেজ ইউআরআই।

GcsSource

Google ক্লাউড স্টোরেজ অবস্থান যেখান থেকে ইনপুট ফাইল পড়া হবে।

ক্ষেত্র
uri

string

প্রয়োজন। gs://bucket/path/to/object ফর্ম্যাট সহ একটি Google ক্লাউড স্টোরেজ অবজেক্টের URI।

Injected Solution Constraint

কোন ভিজিটগুলিকে সীমাবদ্ধ করা উচিত এবং কীভাবে সেগুলিকে সীমাবদ্ধ করা উচিত সে সম্পর্কে তথ্য সহ অনুরোধে সমাধান ইনজেকশন করা হয়েছে৷

ক্ষেত্র
routes[]

ShipmentRoute

ইনজেকশন সমাধানের রুট। মূল সমাধান থেকে কিছু রুট বাদ দেওয়া যেতে পারে। রুট এবং এড়িয়ে যাওয়া শিপমেন্টগুলিকে অবশ্যই injected_first_solution_routes এর জন্য তালিকাভুক্ত মৌলিক বৈধতা অনুমানগুলি পূরণ করতে হবে৷

skipped_ shipments[]

SkippedShipment

ইনজেকশনের সমাধানের চালান এড়িয়ে গেছে। মূল সমাধান থেকে কিছু বাদ দেওয়া যেতে পারে। routes ক্ষেত্র দেখুন.

constraint_ relaxations[]

ConstraintRelaxation

যানবাহনের শূন্য বা তার বেশি গ্রুপের জন্য, কখন এবং কতটা সীমাবদ্ধতা শিথিল করতে হবে তা নির্দিষ্ট করে। যদি এই ক্ষেত্রটি খালি থাকে, সমস্ত অ-খালি যানবাহন রুট সম্পূর্ণরূপে সীমাবদ্ধ।

সীমাবদ্ধতা শিথিলকরণ

যানবাহনের একটি গ্রুপের জন্য, পরিদর্শনে কোন প্রান্তিক (গুলি) সীমাবদ্ধতা শিথিল করা হবে এবং কোন স্তরে তা নির্দিষ্ট করে৷ skipped_shipment ক্ষেত্রে তালিকাভুক্ত শিপমেন্টগুলি এড়ানোর জন্য সীমাবদ্ধ; অর্থাৎ, তারা সঞ্চালিত করা যাবে না.

ক্ষেত্র
relaxations[]

Relaxation

সমস্ত ভিজিট সীমাবদ্ধতা শিথিলতা যা vehicle_indices যানবাহন সহ রুটে পরিদর্শনের ক্ষেত্রে প্রযোজ্য হবে।

vehicle_ indices[]

int32

যানবাহনের সূচকগুলি নির্দিষ্ট করে যেখানে পরিদর্শন সীমাবদ্ধতা relaxations প্রযোজ্য। খালি থাকলে, এটি ডিফল্ট হিসাবে বিবেচিত হয় এবং relaxations সমস্ত যানবাহনের ক্ষেত্রে প্রযোজ্য হয় যেগুলি অন্যান্য constraint_relaxations নির্দিষ্ট করা হয়নি। সর্বাধিক একটি ডিফল্ট থাকতে পারে, অর্থাৎ, সর্বাধিক একটি সীমাবদ্ধতা শিথিলকরণ ক্ষেত্রে খালি vehicle_indices অনুমোদিত। একটি যানবাহন সূচক শুধুমাত্র একবার তালিকাভুক্ত করা যেতে পারে, এমনকি বেশ কয়েকটি constraint_relaxations মধ্যেও।

একটি গাড়ির সূচী ShipmentRoute.vehicle_index এর মতই ম্যাপ করা হয়, যদি interpret_injected_solutions_using_labels সত্য হয় ( fields মন্তব্য দেখুন)।

শিথিলতা

relaxations খালি থাকলে, routes সমস্ত দর্শনের শুরুর সময় এবং ক্রম সম্পূর্ণরূপে সীমাবদ্ধ থাকে এবং সেই রুটে কোনও নতুন ভিজিট সন্নিবেশ করা বা যোগ করা যাবে না। এছাড়াও, routes একটি গাড়ির শুরু এবং শেষের সময় সম্পূর্ণরূপে সীমাবদ্ধ, যতক্ষণ না গাড়িটি খালি থাকে (অর্থাৎ, কোনও ভিজিট নেই এবং মডেলটিতে মিথ্যা সেট used_if_route_is_empty হয়েছে)।

relaxations(i).level একটি পরিদর্শন #j-এ প্রয়োগ করা সীমাবদ্ধতা শিথিলকরণ স্তর নির্দিষ্ট করে যা সন্তুষ্ট করে:

  • route.visits(j).start_time >= relaxations(i).threshold_time AND
  • j + 1 >= relaxations(i).threshold_visit_count

একইভাবে, গাড়ির স্টার্ট relaxations(i).level শিথিল করা হয় যদি এটি সন্তুষ্ট করে:

  • vehicle_start_time >= relaxations(i).threshold_time AND
  • relaxations(i).threshold_visit_count == 0 এবং গাড়ির শেষ relaxations(i).level শিথিল করা হয় যদি এটি সন্তুষ্ট হয়:
  • vehicle_end_time >= relaxations(i).threshold_time এবং
  • route.visits_size() + 1 >= relaxations(i).threshold_visit_count

একটি শিথিলকরণ স্তর প্রয়োগ করতে যদি একটি ভিজিট threshold_visit_count বা threshold_time একই level সাথে দুটি relaxations যোগ করে: একটি শুধুমাত্র threshold_visit_count সেট সহ এবং অন্যটি শুধুমাত্র threshold_time সেট সহ। যদি একটি পরিদর্শন একাধিক relaxations শর্তগুলিকে সন্তুষ্ট করে, তবে সবচেয়ে শিথিল স্তরটি প্রযোজ্য। ফলস্বরূপ, যানবাহন শুরু থেকে রুট পরিদর্শনের মধ্য দিয়ে যান শেষ পর্যন্ত, শিথিলকরণ স্তরটি আরও শিথিল হয়ে ওঠে: অর্থাৎ, রুটটি অগ্রসর হওয়ার সাথে সাথে শিথিলকরণ স্তরটি হ্রাস পাচ্ছে না।

রুট ভিজিটের সময় এবং ক্রম যা কোন relaxations থ্রেশহোল্ড শর্ত পূরণ করে না তা সম্পূর্ণরূপে সীমাবদ্ধ এবং এই ক্রমগুলিতে কোন ভিজিট সন্নিবেশিত করা যাবে না। এছাড়াও, যদি একটি গাড়ির শুরু বা শেষ কোনো শিথিলতার শর্ত পূরণ না করে তবে সময় নির্দিষ্ট করা হয়, যদি না গাড়িটি খালি থাকে।

ক্ষেত্র
level

Level

সীমাবদ্ধতা শিথিলকরণ স্তর যা প্রযোজ্য হয় যখন threshold_time এ বা তার পরে এবং কমপক্ষে threshold_visit_count সন্তুষ্ট হয়।

threshold_ time

Timestamp

যে সময় বা তার পরে শিথিলকরণ level প্রয়োগ করা যেতে পারে।

threshold_ visit_ count

int32

পরিদর্শনের সংখ্যা বা তার পরে শিথিলকরণ level প্রয়োগ করা যেতে পারে। যদি threshold_visit_count 0 হয় (বা সেট করা হয়নি), তাহলে গাড়ির স্টার্টে level সরাসরি প্রয়োগ করা হতে পারে।

যদি এটি route.visits_size() + 1 হয় তবে level শুধুমাত্র গাড়ির প্রান্তে প্রয়োগ করা যেতে পারে। যদি এটি route.visits_size() + 1 এর চেয়ে বেশি হয়, তবে সেই রুটের জন্য level মোটেও প্রয়োগ করা হয় না।

স্তর

বিভিন্ন সীমাবদ্ধতা শিথিলকরণ স্তরগুলি প্রকাশ করে, যা একটি পরিদর্শনের জন্য প্রয়োগ করা হয় এবং যেগুলি থ্রেশহোল্ড শর্তগুলিকে সন্তুষ্ট করার সময় অনুসরণ করে৷

নীচের গণনাটি শিথিলকরণ বৃদ্ধির ক্রম অনুসারে।

Enums
LEVEL_UNSPECIFIED

অন্তর্নিহিত ডিফল্ট শিথিলকরণ স্তর: কোন সীমাবদ্ধতা শিথিল করা হয় না, অর্থাৎ, সমস্ত পরিদর্শন সম্পূর্ণরূপে সীমাবদ্ধ।

এই মানটি স্পষ্টভাবে level ব্যবহার করা উচিত নয়।

RELAX_VISIT_TIMES_AFTER_THRESHOLD ভিজিট শুরুর সময় এবং গাড়ির শুরু/শেষের সময় শিথিল করা হবে, কিন্তু প্রতিটি ভিজিট একই গাড়ির সাথে আবদ্ধ থাকবে এবং ভিজিট সিকোয়েন্স অবশ্যই পালন করতে হবে: তাদের মধ্যে বা তাদের আগে কোন ভিজিট ঢোকানো যাবে না।
RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD RELAX_VISIT_TIMES_AFTER_THRESHOLD এর মতোই, কিন্তু ভিজিট সিকোয়েন্সটিও শিথিল: ভিজিটগুলি শুধুমাত্র এই গাড়ির মাধ্যমে করা যেতে পারে, কিন্তু সম্ভাব্যভাবে অকার্যকর হয়ে যেতে পারে৷
RELAX_ALL_AFTER_THRESHOLD RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD এর মতোই, তবে গাড়িটিও শিথিল: থ্রেশহোল্ডের সময় বা তার পরে পরিদর্শন সম্পূর্ণ বিনামূল্যে এবং সম্ভাব্যভাবে অকার্যকর হয়ে যেতে পারে।

ইনপুট কনফিগারেশন

[BatchOptimizeTours][google.maps.routeoptimization.v1.RouteOptimizationService.BatchOptimizeTours]-এর জন্য একটি ইনপুট নির্দিষ্ট করুন।

ক্ষেত্র
data_ format

DataFormat

প্রয়োজন। ইনপুট তথ্য বিন্যাস.

ইউনিয়ন ক্ষেত্র source । প্রয়োজন। source নিম্নলিখিতগুলির মধ্যে একটি হতে পারে:
gcs_ source

GcsSource

একটি Google ক্লাউড স্টোরেজ অবস্থান। এটি একটি একক বস্তু (ফাইল) হতে হবে।

অবস্থান

একটি অবস্থান (একটি ভৌগলিক বিন্দু, এবং একটি ঐচ্ছিক শিরোনাম) এনক্যাপসুলেট করে।

ক্ষেত্র
lat_ lng

LatLng

ওয়েপয়েন্টের ভৌগলিক স্থানাঙ্ক।

heading

int32

কম্পাস শিরোনাম ট্র্যাফিক প্রবাহের দিকের সাথে যুক্ত। পিকআপ এবং ড্রপ-অফের জন্য ব্যবহার করার জন্য রাস্তার পাশে নির্দিষ্ট করতে এই মানটি ব্যবহার করা হয়। শিরোনামের মান 0 থেকে 360 পর্যন্ত হতে পারে, যেখানে 0 সঠিক উত্তরের একটি শিরোনাম নির্দিষ্ট করে, 90 পূর্বের পূর্বের শিরোনাম উল্লেখ করে ইত্যাদি।

অপটিমাইজ ট্যুর রিকোয়েস্ট

একটি ট্যুর অপ্টিমাইজেশান সমাধানকারীকে দেওয়ার অনুরোধ যা সমাধানের জন্য শিপমেন্ট মডেলের পাশাপাশি অপ্টিমাইজেশন প্যারামিটারগুলিকে সংজ্ঞায়িত করে৷

ক্ষেত্র
parent

string

প্রয়োজন। একটি কল করতে লক্ষ্য প্রকল্প বা অবস্থান.

বিন্যাস: * projects/{project-id} * projects/{project-id}/locations/{location-id}

কোনো অবস্থান নির্দিষ্ট না থাকলে, একটি অঞ্চল স্বয়ংক্রিয়ভাবে বেছে নেওয়া হবে।

timeout

Duration

এই টাইমআউট সেট করা থাকলে, টাইমআউট পিরিয়ড অতিবাহিত হওয়ার আগে বা সিঙ্ক্রোনাস অনুরোধের জন্য সার্ভারের সময়সীমা পৌঁছে যাওয়ার আগে সার্ভার একটি প্রতিক্রিয়া প্রদান করে, যেটি তাড়াতাড়ি হয়।

অ্যাসিঙ্ক্রোনাস অনুরোধের জন্য, সময় শেষ হওয়ার আগে সার্ভার একটি সমাধান (যদি সম্ভব হয়) তৈরি করবে।

model

ShipmentModel

সমাধানের জন্য চালানের মডেল।

solving_ mode

SolvingMode

ডিফল্টরূপে, সমাধানের মোড হল DEFAULT_SOLVE (0)।

search_ mode

SearchMode

অনুসন্ধান মোড অনুরোধ সমাধান করতে ব্যবহৃত.

injected_ first_ solution_ routes[]

ShipmentRoute

পূর্ববর্তী সমাধানের অনুরূপ একটি প্রথম সমাধান খুঁজে পেতে অপ্টিমাইজেশান অ্যালগরিদমকে গাইড করুন।

প্রথম সমাধান নির্মিত হলে মডেলটি সীমাবদ্ধ। কোনো রুটে সঞ্চালিত নয় এমন কোনো চালান প্রথম সমাধানে পরোক্ষভাবে বাদ দেওয়া হয়, তবে সেগুলো ধারাবাহিক সমাধানে সঞ্চালিত হতে পারে।

সমাধানটি অবশ্যই কিছু মৌলিক বৈধতা অনুমান পূরণ করবে:

  • সমস্ত রুটের জন্য, vehicle_index অবশ্যই পরিসরে থাকতে হবে এবং নকল করা যাবে না।
  • সমস্ত ভিজিটের জন্য, shipment_index এবং visit_request_index অবশ্যই পরিসরে থাকতে হবে।
  • একটি চালান শুধুমাত্র একটি রুটে উল্লেখ করা যেতে পারে.
  • একটি পিকআপ-ডেলিভারি চালানের পিকআপ ডেলিভারির আগে সঞ্চালিত করা আবশ্যক।
  • একটি চালানের একাধিক পিকআপ বিকল্প বা বিতরণ বিকল্প সঞ্চালিত হতে পারে না।
  • সব রুটের জন্য, সময় বাড়ছে (যেমন, vehicle_start_time <= visits[0].start_time <= visits[1].start_time ... <= vehicle_end_time )।
  • একটি চালান শুধুমাত্র অনুমোদিত যানবাহনে সঞ্চালিত হতে পারে। Shipment.allowed_vehicle_indices খালি থাকলে বা এর vehicle_index Shipment.allowed_vehicle_indices এ অন্তর্ভুক্ত থাকলে একটি গাড়ির অনুমতি দেওয়া হয়।

যদি ইনজেকশন দেওয়া দ্রবণটি সম্ভব না হয়, তবে একটি বৈধতা ত্রুটি অগত্যা ফেরত দেওয়া হয় না এবং এর পরিবর্তে অসম্ভাব্যতা নির্দেশ করে একটি ত্রুটি ফেরত দেওয়া হতে পারে।

injected_ solution_ constraint

InjectedSolutionConstraint

অপ্টিমাইজেশান অ্যালগরিদম সীমাবদ্ধ করুন একটি চূড়ান্ত সমাধান খুঁজে পেতে যা পূর্ববর্তী সমাধানের মতো। উদাহরণস্বরূপ, এটি রুটের অংশগুলিকে হিমায়িত করতে ব্যবহার করা যেতে পারে যা ইতিমধ্যে সম্পন্ন হয়েছে বা যা সম্পূর্ণ করা হবে কিন্তু সংশোধন করা উচিত নয়।

যদি ইনজেকশন দেওয়া দ্রবণটি সম্ভব না হয়, তবে একটি বৈধতা ত্রুটি অগত্যা ফেরত দেওয়া হয় না এবং এর পরিবর্তে অসম্ভাব্যতা নির্দেশ করে একটি ত্রুটি ফেরত দেওয়া হতে পারে।

refresh_ details_ routes[]

ShipmentRoute

যদি খালি না হয়, প্রদত্ত রুটগুলি রিফ্রেশ করা হবে, তাদের ভিজিট বা ভ্রমণের সময়গুলির অন্তর্নিহিত ক্রম পরিবর্তন না করে: শুধুমাত্র অন্যান্য বিবরণ আপডেট করা হবে। এটি মডেলের সমাধান করে না।

2020/11 অনুসারে, এটি শুধুমাত্র খালি নয় এমন রুটের পলিলাইনগুলিকে পপুলেট করে এবং প্রয়োজন যে populate_polylines সত্য।

পাস করা রুটের route_polyline ক্ষেত্রগুলি রুট transitions সাথে অসামঞ্জস্যপূর্ণ হতে পারে।

এই ক্ষেত্রটি অবশ্যই injected_first_solution_routes বা injected_solution_constraint এর সাথে ব্যবহার করা উচিত নয়।

Shipment.ignore এবং Vehicle.ignore আচরণের উপর কোন প্রভাব ফেলে না। সংশ্লিষ্ট চালান বা যানবাহন উপেক্ষা করা হোক না কেন, সমস্ত অ-খালি রুটে সমস্ত ভিজিটের মধ্যে পলিলাইনগুলি এখনও জনবহুল।

interpret_ injected_ solutions_ using_ labels

bool

সত্য হলে:

  • অনুরোধে যানবাহনের সাথে একটি ইনজেকশনযুক্ত দ্রবণে রুট মেলানোর জন্য vehicle_index এর পরিবর্তে ShipmentRoute.vehicle_label ব্যবহার করে; খালি না থাকলে ConstraintRelaxation.vehicle_indices আপডেট করতে আসল ShipmentRoute.vehicle_index এর ম্যাপিং নতুন ShipmentRoute.vehicle_index এ পুনরায় ব্যবহার করে, কিন্তু ম্যাপিংটি অবশ্যই দ্ব্যর্থহীন হতে হবে (অর্থাৎ, একাধিক ShipmentRoute s একই মূল vehicle_index শেয়ার করা উচিত নয়)।
  • অনুরোধে শিপমেন্টের সাথে একটি ইনজেকশন করা সমাধানে ভিজিট মেলাতে shipment_index এর পরিবর্তে ShipmentRoute.Visit.shipment_label ব্যবহার করে;
  • অনুরোধ শিপমেন্টের সাথে ইনজেকশন করা দ্রবণে এড়িয়ে যাওয়া শিপমেন্টের সাথে মেলাতে SkippedShipment.index এর পরিবর্তে SkippedShipment.label ব্যবহার করে।

এই ব্যাখ্যাটি injected_first_solution_routes , injected_solution_constraint , এবং refresh_details_routes ক্ষেত্রে প্রযোজ্য। এটি ব্যবহার করা যেতে পারে যখন অনুরোধে চালান বা যানবাহনের সূচকগুলি সমাধানটি তৈরি হওয়ার পর থেকে পরিবর্তিত হয়, সম্ভবত শিপমেন্ট বা যানবাহন অনুরোধ থেকে সরানো হয়েছে বা যোগ করা হয়েছে।

সত্য হলে, নিম্নলিখিত বিভাগের লেবেলগুলি অবশ্যই তাদের বিভাগে একবারে উপস্থিত হতে হবে:

যদি ইনজেকশনের দ্রবণে একটি vehicle_label একটি অনুরোধ গাড়ির সাথে মিল না থাকে, তাহলে সংশ্লিষ্ট রুটটি তার পরিদর্শন সহ সমাধান থেকে সরানো হয়। যদি ইনজেকশনের দ্রবণে একটি shipment_label একটি অনুরোধ চালানের সাথে সঙ্গতিপূর্ণ না হয়, তাহলে সংশ্লিষ্ট ভিজিটটি সমাধান থেকে সরানো হয়। যদি ইনজেকশন করা দ্রবণে একটি SkippedShipment.label অনুরোধ চালানের সাথে সামঞ্জস্যপূর্ণ না হয়, SkippedShipment সমাধান থেকে সরানো হয়।

একটি ইনজেকশনযুক্ত দ্রবণ থেকে রুট ভিজিট বা সম্পূর্ণ রুটগুলি সরানো অন্তর্নিহিত সীমাবদ্ধতার উপর প্রভাব ফেলতে পারে, যা সমাধানে পরিবর্তন, বৈধতা ত্রুটি বা অসম্ভাব্যতা হতে পারে।

দ্রষ্টব্য: কলকারীকে অবশ্যই নিশ্চিত করতে হবে যে প্রতিটি Vehicle.label (resp. Shipment.label ) দুটি প্রাসঙ্গিক অনুরোধ জুড়ে ব্যবহৃত একটি যানবাহন (resp. শিপমেন্ট) সত্তাকে স্বতন্ত্রভাবে সনাক্ত করে: অতীতের অনুরোধ যা ইনজেকশনের সমাধানে ব্যবহৃত OptimizeToursResponse তৈরি করেছিল এবং বর্তমান অনুরোধ যাতে ইনজেকশনের সমাধান অন্তর্ভুক্ত থাকে। উপরে বর্ণিত স্বতন্ত্রতা পরীক্ষাগুলি এই প্রয়োজনীয়তার গ্যারান্টি দেওয়ার জন্য যথেষ্ট নয়।

consider_ road_ traffic

bool

ShipmentRoute , Transition.travel_duration , এবং Visit.start_time vehicle_end_time ShipmentRoute.has_traffic_infeasibilities ক্ষেত্র সেট করতে এবং OptimizeToursResponse.total_cost ফিল্ড গণনা করতে।

populate_ polylines

bool

সত্য হলে, ShipmentRoute s এর প্রতিক্রিয়ায় পলিলাইনগুলি পপুলেট করা হবে।

populate_ transition_ polylines

bool

সত্য হলে, ShipmentRoute.transitions এ পলিলাইন এবং রুট টোকেনগুলি পূরণ করা হবে।

allow_ large_ deadline_ despite_ interruption_ risk

bool

যদি এটি সেট করা থাকে, তাহলে অনুরোধের একটি সময়সীমা থাকতে পারে ( https://grpc.io/blog/deadlines দেখুন) 60 মিনিট পর্যন্ত। অন্যথায়, সর্বোচ্চ সময়সীমা মাত্র 30 মিনিট। মনে রাখবেন যে দীর্ঘস্থায়ী অনুরোধগুলির একটি উল্লেখযোগ্যভাবে বড় (কিন্তু এখনও ছোট) বাধার ঝুঁকি রয়েছে।

use_ geodesic_ distances

bool

যদি সত্য হয়, ভ্রমণের দূরত্বগুলি Google মানচিত্রের দূরত্বের পরিবর্তে জিওডেসিক দূরত্ব ব্যবহার করে গণনা করা হবে, এবং ভ্রমণের সময়গুলি জিওডেসিক দূরত্ব ব্যবহার করে গণনা করা হবে geodesic_meters_per_second দ্বারা সংজ্ঞায়িত গতির সাথে।

label

string

এই অনুরোধ শনাক্ত করতে ব্যবহার করা হতে পারে এমন লেবেল, OptimizeToursResponse.request_label এ আবার রিপোর্ট করা হয়েছে।

geodesic_ meters_ per_ second

double

যখন use_geodesic_distances সত্য হয়, তখন এই ক্ষেত্রটি অবশ্যই সেট করতে হবে এবং ভ্রমণের সময় গণনা করার জন্য প্রয়োগ করা গতি সংজ্ঞায়িত করতে হবে। এর মান কমপক্ষে 1.0 মিটার/সেকেন্ড হতে হবে।

max_ validation_ errors

int32

প্রত্যাবর্তিত বৈধতা ত্রুটির সংখ্যা ছেঁটে ফেলে৷ এই ত্রুটিগুলি সাধারণত একটি INVALID_ARGUMENT ত্রুটির পেলোডের সাথে একটি BadRequest ত্রুটি বিশদ বিবরণ ( https://cloud.google.com/apis/design/errors#error_details ) হিসাবে সংযুক্ত থাকে, যদি না solving_mode=VALIDATE_ONLY: OptimizeToursResponse.validation_errors field_validation দেখুন৷ এটি ডিফল্ট 100 এবং 10,000 এ সীমাবদ্ধ।

অনুসন্ধান মোড

মোড অনুসন্ধানের আচরণকে সংজ্ঞায়িত করে, ট্রেডিং অফ লেটেন্সি বনাম সমাধানের গুণমান। সমস্ত মোডে, বিশ্বব্যাপী অনুরোধের সময়সীমা কার্যকর করা হয়।

Enums
SEARCH_MODE_UNSPECIFIED অনির্দিষ্ট অনুসন্ধান মোড, RETURN_FAST এর সমতুল্য।
RETURN_FAST প্রথম ভাল সমাধান খুঁজে পাওয়ার পরে অনুসন্ধান বন্ধ করুন।
CONSUME_ALL_AVAILABLE_TIME আরও ভাল সমাধান অনুসন্ধান করার জন্য সমস্ত উপলব্ধ সময় ব্যয় করুন।

সমাধান মোড

সমাধানকারীর অনুরোধটি কীভাবে পরিচালনা করা উচিত তা সংজ্ঞায়িত করে। সমস্ত মোডে VALIDATE_ONLY , যদি অনুরোধটি অবৈধ হয়, আপনি একটি INVALID_REQUEST ত্রুটি পাবেন৷ ফিরে আসা ত্রুটির সংখ্যা ক্যাপ করতে max_validation_errors দেখুন।

Enums
DEFAULT_SOLVE মডেলটি সমাধান করুন। [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]-এ সতর্কতা জারি করা হতে পারে।
VALIDATE_ONLY শুধুমাত্র মডেলটিকে সমাধান না করেই যাচাই করে: যতটা সম্ভব OptimizeToursResponse.validation_errors পূরণ করে।
DETECT_SOME_INFEASIBLE_SHIPMENTS

শুধুমাত্র OptimizeToursResponse.validation_errors বা OptimizeToursResponse.skipped_shipments পপুলেট করে এবং প্রকৃতপক্ষে বাকি অনুরোধের সমাধান করে না (প্রতিক্রিয়ায় status এবং routes সেট করা নেই)। যদি injected_solution_constraint রুটে অসম্ভাব্যতা সনাক্ত করা হয় তবে সেগুলি OptimizeToursResponse.validation_errors ফিল্ডে জমা হয় এবং OptimizeToursResponse.skipped_shipments খালি রাখা হয়।

গুরুত্বপূর্ণ : সমস্ত অসম্ভাব্য চালান এখানে ফেরত দেওয়া হয় না, তবে শুধুমাত্র যেগুলি প্রিপ্রসেসিংয়ের সময় অসম্ভাব্য হিসাবে সনাক্ত করা হয়।

OptimizeToursResponse

একটি ট্যুর অপ্টিমাইজেশান সমস্যার সমাধান করার পরে প্রতিক্রিয়া যা প্রতিটি গাড়ির দ্বারা অনুসরণ করা রুটগুলি, শিপমেন্টগুলি যা এড়িয়ে গেছে এবং সমাধানের সামগ্রিক খরচ।

ক্ষেত্র
routes[]

ShipmentRoute

প্রতিটি গাড়ির জন্য গণনা করা রুট; i-th রুট মডেলের i-th যানের সাথে মিলে যায়।

request_ label

string

OptimizeToursRequest.label এর অনুলিপি, যদি অনুরোধে একটি লেবেল নির্দিষ্ট করা থাকে।

skipped_ shipments[]

SkippedShipment

সমস্ত চালানের তালিকা এড়িয়ে গেছে।

validation_ errors[]

OptimizeToursValidationError

সমস্ত বৈধতা ত্রুটির তালিকা যা আমরা স্বাধীনভাবে সনাক্ত করতে সক্ষম হয়েছি। OptimizeToursValidationError বার্তাটির জন্য "একাধিক ত্রুটি" ব্যাখ্যাটি দেখুন৷ ত্রুটির পরিবর্তে, এটি DEFAULT_SOLVE হল solving_mode ক্ষেত্রে সতর্কতা অন্তর্ভুক্ত করবে।

metrics

Metrics

এই সমাধানের জন্য সময়কাল, দূরত্ব এবং ব্যবহারের মেট্রিক্স।

মেট্রিক্স

সামগ্রিক মেট্রিক্স, সমস্ত রুটে একত্রিত।

ক্ষেত্র
aggregated_ route_ metrics

AggregatedMetrics

রুট উপর একত্রিত. প্রতিটি মেট্রিক হল একই নামের সমস্ত ShipmentRoute.metrics ক্ষেত্রের যোগফল (বা সর্বোচ্চ, লোডের জন্য)।

skipped_ mandatory_ shipment_ count

int32

এড়িয়ে যাওয়া বাধ্যতামূলক চালানের সংখ্যা।

used_ vehicle_ count

int32

ব্যবহৃত যানবাহনের সংখ্যা। দ্রষ্টব্য: যদি একটি যানবাহনের রুট খালি থাকে এবং Vehicle.used_if_route_is_empty সত্য হয়, তাহলে গাড়িটিকে ব্যবহৃত বলে গণ্য করা হবে।

earliest_ vehicle_ start_ time

Timestamp

একটি ব্যবহৃত গাড়ির জন্য প্রথম দিকের শুরুর সময়, ShipmentRoute.vehicle_start_time এর সমস্ত ব্যবহৃত যানবাহনের ন্যূনতম হিসাবে গণনা করা হয়।

latest_ vehicle_ end_ time

Timestamp

একটি ব্যবহৃত গাড়ির সর্বশেষ শেষ সময়, ShipmentRoute.vehicle_end_time এর সমস্ত ব্যবহৃত যানবাহনের উপর সর্বাধিক হিসাবে গণনা করা হয়।

costs

map<string, double>

সমাধানের খরচ, খরচ-সম্পর্কিত অনুরোধ ক্ষেত্র দ্বারা বিভক্ত। কীগুলি হল প্রোটো পাথ, ইনপুট OptimizeToursRequest-এর সাপেক্ষে, যেমন "model.shipments.pickups.cost", এবং মানগুলি হল সংশ্লিষ্ট খরচ ক্ষেত্রের দ্বারা উত্পন্ন মোট খরচ, সমগ্র সমাধানের উপর একত্রিত৷ অন্য কথায়, খরচ ["model.shipments.pickups.cost"] হল সমাধানের সমস্ত পিকআপ খরচের সমষ্টি। মডেলে সংজ্ঞায়িত সমস্ত খরচ এখানে বিস্তারিতভাবে রিপোর্ট করা হয়েছে ট্রানজিশন অ্যাট্রিবিউটের সাথে সম্পর্কিত খরচগুলি বাদ দিয়ে যেগুলি শুধুমাত্র 2022/01 হিসাবে সমষ্টিগতভাবে রিপোর্ট করা হয়েছে।

total_ cost

double

সমাধানের মোট খরচ। খরচ ম্যাপে সমস্ত মানের সমষ্টি।

OptimizeToursValidationError

একটি OptimizeToursRequest যাচাই করার সময় একটি ত্রুটি বা সতর্কতা দেখা দেয়।

ক্ষেত্র
code

int32

একটি বৈধতা ত্রুটি জোড়া ( code , display_name ) দ্বারা সংজ্ঞায়িত করা হয় যা সর্বদা উপস্থিত থাকে।

এই বিভাগটি অনুসরণ করা ক্ষেত্রগুলি ত্রুটি সম্পর্কে আরও প্রসঙ্গ সরবরাহ করে।

একাধিক ত্রুটি : যখন একাধিক ত্রুটি থাকে, তখন যাচাইকরণ প্রক্রিয়া তাদের মধ্যে কয়েকটি আউটপুট করার চেষ্টা করে। অনেকটা কম্পাইলারের মতো, এটি একটি অপূর্ণ প্রক্রিয়া। কিছু বৈধতা ত্রুটি "মারাত্মক" হবে, যার অর্থ তারা পুরো বৈধতা প্রক্রিয়া বন্ধ করে দেয়। অন্যদের মধ্যে display_name="UNSPECIFIED" ত্রুটির ক্ষেত্রে এটি হয়৷ কিছু ত্রুটির কারণে বৈধকরণ প্রক্রিয়া অন্যান্য ত্রুটিগুলি এড়িয়ে যেতে পারে৷

স্থিতিশীলতা : code এবং display_name খুব স্থিতিশীল হওয়া উচিত। কিন্তু সময়ের সাথে সাথে নতুন কোড এবং ডিসপ্লে নাম প্রদর্শিত হতে পারে, যা একটি ভিন্ন ( code , display_name ) জোড়া দেওয়ার জন্য একটি প্রদত্ত (অবৈধ) অনুরোধের কারণ হতে পারে কারণ নতুন ত্রুটিটি পুরানোটিকে লুকিয়ে রেখেছে৷ উদাহরণস্বরূপ, "একাধিক ত্রুটি" দেখুন।

display_ name

string

ত্রুটি প্রদর্শন নাম.

fields[]

FieldReference

একটি ত্রুটি প্রসঙ্গে 0, 1 (বেশিরভাগ সময়) বা আরও ক্ষেত্র জড়িত হতে পারে। উদাহরণস্বরূপ, যানবাহন # 4 এবং চালান # 2 এর প্রথম পিকআপকে উল্লেখ করা নিম্নরূপ করা যেতে পারে:

fields { name: "vehicles" index: 4}
fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }

উল্লেখ্য, যাইহোক, প্রদত্ত ত্রুটি কোডের জন্য fields মূলত্ব পরিবর্তন করা উচিত নয়।

error_ message

string

মানব-পাঠযোগ্য স্ট্রিং ত্রুটি বর্ণনা করে। code এবং error_message এর মধ্যে একটি 1:1 ম্যাপিং আছে (when code!= "UNSPECIFIED")।

স্থিতিশীলতা : স্থিতিশীল নয়: একটি প্রদত্ত code সাথে সম্পর্কিত ত্রুটি বার্তাটি সময়ের সাথে পরিবর্তিত হতে পারে (আশা করি এটি স্পষ্ট করতে হবে)। পরিবর্তে display_name এবং code উপর নির্ভর করুন.

offending_ values

string

ক্ষেত্র(গুলি) এর মান(গুলি) থাকতে পারে৷ এটি সবসময় পাওয়া যায় না। আপনার এটির উপর একেবারেই নির্ভর করা উচিত নয় এবং এটি শুধুমাত্র ম্যানুয়াল মডেল ডিবাগিংয়ের জন্য ব্যবহার করা উচিত।

ফিল্ড রেফারেন্স

বৈধতা ত্রুটির জন্য একটি প্রসঙ্গ নির্দিষ্ট করে। একটি FieldReference সর্বদা এই ফাইলের একটি প্রদত্ত ক্ষেত্রকে নির্দেশ করে এবং একই শ্রেণিবদ্ধ কাঠামো অনুসরণ করে। উদাহরণস্বরূপ, আমরা ব্যবহার করে যানবাহন #5 এর start_time_windows এর উপাদান #2 নির্দিষ্ট করতে পারি:

name: "vehicles" index: 5 sub_field { name: "end_time_windows" index: 2 }

তবে আমরা বার্তার ভিড় এড়াতে OptimizeToursRequest বা ShipmentModel মতো শীর্ষ-স্তরের সত্তা বাদ দিই।

ক্ষেত্র
name

string

ক্ষেত্রের নাম, যেমন, "যান"।

sub_ field

FieldReference

প্রয়োজনে বারবার নেস্টেড সাব-ফিল্ড।

ইউনিয়ন ক্ষেত্র index_or_key .

index_or_key নিম্নলিখিতগুলির মধ্যে একটি হতে পারে:

index

int32

বারবার হলে ক্ষেত্রের সূচক।

key

string

ক্ষেত্রটি একটি মানচিত্র হলে কী।

আউটপুট কনফিগারেশন

[BatchOptimizeTours][google.maps.routeoptimization.v1.RouteOptimizationService.BatchOptimizeTours] ফলাফলের জন্য একটি গন্তব্য নির্দিষ্ট করুন।

ক্ষেত্র
data_ format

DataFormat

প্রয়োজন। আউটপুট ডেটা বিন্যাস।

ইউনিয়ন ক্ষেত্রের destination । প্রয়োজন। destination নিম্নলিখিতগুলির মধ্যে একটি হতে পারে:
gcs_ destination

GcsDestination

আউটপুট লিখতে Google ক্লাউড স্টোরেজ অবস্থান।

রুট মডিফায়ার

যানবাহনের রুট গণনা করার সময় সন্তুষ্ট করার জন্য ঐচ্ছিক অবস্থার একটি সেট এনক্যাপসুলেট করে। এটি Google Maps Platform Routes Preferred API-এর RouteModifiers এর মতোই; দেখুন: https://developers.google.com/maps/documentation/routes/reference/rest/v2/RouteModifiers

ক্ষেত্র
avoid_ tolls

bool

যেখানে যুক্তিসঙ্গত টোল রাস্তাগুলি এড়ানো উচিত তা নির্দিষ্ট করে৷ টোল রোড নেই এমন রুটে অগ্রাধিকার দেওয়া হবে। শুধুমাত্র মোটর চালিত ভ্রমণ মোডের জন্য প্রযোজ্য।

avoid_ highways

bool

যেখানে যুক্তিসঙ্গত হাইওয়ে এড়াতে হবে তা নির্দিষ্ট করে। মহাসড়ক নেই এমন রুটে অগ্রাধিকার দেওয়া হবে। শুধুমাত্র মোটর চালিত ভ্রমণ মোডের জন্য প্রযোজ্য।

avoid_ ferries

bool

যেখানে যুক্তিসঙ্গত ফেরিগুলি এড়াতে হবে তা নির্দিষ্ট করে৷ ফেরিতে যাতায়াত নেই এমন রুটে অগ্রাধিকার দেওয়া হবে। শুধুমাত্র মোটর চালিত ভ্রমণ মোডের জন্য প্রযোজ্য।

avoid_ indoor

bool

ঐচ্ছিক। যুক্তিসঙ্গত হলে বাড়ির ভিতরে নেভিগেট করা এড়াতে হবে কিনা তা নির্দিষ্ট করে৷ ইনডোর নেভিগেশন নেই এমন রুটগুলিতে অগ্রাধিকার দেওয়া হবে। শুধুমাত্র WALKING ট্রাভেল মোডে প্রযোজ্য।

চালান

একটি একক আইটেমের চালান, এটির একটি পিকআপ থেকে তার একটি ডেলিভারি পর্যন্ত। চালানটি সম্পাদিত হিসাবে বিবেচিত হওয়ার জন্য, একটি অনন্য যানবাহনকে অবশ্যই তার পিকআপ অবস্থানগুলির একটিতে যেতে হবে (এবং সেই অনুযায়ী তার অতিরিক্ত ক্ষমতা হ্রাস করতে হবে), তারপরে তার ডেলিভারি অবস্থানগুলির একটিতে যান (এবং সেই অনুযায়ী তার অতিরিক্ত ক্ষমতা পুনরায় বাড়াতে হবে)।

ক্ষেত্র
display_ name

string

চালানের ব্যবহারকারী-নির্ধারিত প্রদর্শন নাম। এটি 63 অক্ষর পর্যন্ত দীর্ঘ হতে পারে এবং UTF-8 অক্ষর ব্যবহার করতে পারে।

pickups[]

VisitRequest

চালানের সাথে যুক্ত পিকআপ বিকল্পের সেট। যদি নির্দিষ্ট করা না থাকে, তাহলে গাড়িটিকে শুধুমাত্র ডেলিভারির সাথে সম্পর্কিত একটি অবস্থান পরিদর্শন করতে হবে।

deliveries[]

VisitRequest

চালানের সাথে যুক্ত ডেলিভারি বিকল্পের সেট। নির্দিষ্ট না থাকলে, গাড়িটিকে শুধুমাত্র পিকআপগুলির সাথে সম্পর্কিত একটি অবস্থান পরিদর্শন করতে হবে৷

load_ demands

map<string, Load >

চালানের লোড চাহিদা (উদাহরণস্বরূপ ওজন, আয়তন, প্যালেটের সংখ্যা ইত্যাদি)। মানচিত্রের কীগুলি অনুরূপ লোডের ধরন বর্ণনাকারী শনাক্তকারী হওয়া উচিত, আদর্শভাবে ইউনিটগুলিও সহ। উদাহরণস্বরূপ: "ওজন_কেজি", "ভলিউম_গ্যালন", "প্যালেট_কাউন্ট", ইত্যাদি। যদি একটি প্রদত্ত কী মানচিত্রে উপস্থিত না হয়, তাহলে সংশ্লিষ্ট লোডটিকে শূন্য হিসাবে বিবেচনা করা হয়।

allowed_ vehicle_ indices[]

int32

এই চালান সঞ্চালন করতে পারে যে যানবাহন সেট. খালি থাকলে, সমস্ত যানবাহন এটি সম্পাদন করতে পারে। ShipmentModel vehicles তালিকায় যানবাহনগুলি তাদের সূচক দ্বারা দেওয়া হয়।

costs_ per_ vehicle[]

double

প্রতিটি যানবাহন দ্বারা এই চালানটি বিতরণ করার সময় যে খরচ হয় তা নির্দিষ্ট করে৷ যদি নির্দিষ্ট করা থাকে, তবে এটি অবশ্যই থাকতে হবে:

  • costs_per_vehicle_indices হিসাবে একই সংখ্যক উপাদান। costs_per_vehicle[i] মডেলের গাড়ির_প্রতি_গাড়ির_সূচক costs_per_vehicle_indices[i] এর সাথে মিলে যায়।
  • মডেলের যানবাহন হিসাবে উপাদান একই সংখ্যা. i-th উপাদানটি মডেলের যানবাহন #i-এর সাথে মিলে যায়।

এই খরচ অবশ্যই penalty_cost মতো একই ইউনিটে হতে হবে এবং নেতিবাচক হতে হবে না। এই ক্ষেত্রটি খালি রাখুন, যদি এমন কোন খরচ না থাকে।

costs_ per_ vehicle_ indices[]

int32

যে যানবাহনগুলির সূচকগুলি costs_per_vehicle প্রয়োগ করে। যদি খালি খালি হয় তবে এটির অবশ্যই costs_per_vehicle মতো একই সংখ্যক উপাদান থাকতে হবে। একটি যানবাহন সূচক একাধিকবার নির্দিষ্ট করা যায় না। যদি কোনও যানবাহন costs_per_vehicle_indices থেকে বাদ দেওয়া হয় তবে এর ব্যয় শূন্য।

pickup_ to_ delivery_ absolute_ detour_ limit

Duration

পিকআপ থেকে ডেলিভারি পর্যন্ত স্বল্পতম পথের তুলনায় সর্বাধিক পরম ডিটার সময় নির্দিষ্ট করে। যদি নির্দিষ্ট করা হয় তবে এটি অবশ্যই অবিচ্ছিন্ন হতে হবে এবং চালানের অবশ্যই কমপক্ষে একটি পিকআপ এবং একটি বিতরণ থাকতে হবে।

উদাহরণস্বরূপ, নির্বাচিত পিকআপ বিকল্প থেকে সরাসরি নির্বাচিত বিতরণ বিকল্পের দিকে যাওয়ার জন্য সবচেয়ে কম সময় নেওয়া উচিত। তারপরে pickup_to_delivery_absolute_detour_limit প্রয়োগ করে:

start_time(delivery) - start_time(pickup) <=
t + pickup_to_delivery_absolute_detour_limit

যদি উভয়ই আপেক্ষিক এবং পরম সীমা একই চালানিতে নির্দিষ্ট করা হয় তবে প্রতিটি সম্ভাব্য পিকআপ/বিতরণ জুটির জন্য আরও সীমাবদ্ধ সীমা ব্যবহার করা হয়। 2017/10 হিসাবে, যখন ভ্রমণের সময়সীমা যানবাহনের উপর নির্ভর করে না তখন ডিটারগুলি কেবল তখনই সমর্থিত হয়।

pickup_ to_ delivery_ time_ limit

Duration

চালানের সরবরাহ শুরু করার জন্য পিকআপ শুরু থেকে সর্বাধিক সময়কাল নির্দিষ্ট করে। যদি নির্দিষ্ট করা হয় তবে এটি অবশ্যই অবিচ্ছিন্ন হতে হবে এবং চালানের অবশ্যই কমপক্ষে একটি পিকআপ এবং একটি বিতরণ থাকতে হবে। এটি নির্ভর করে না যে কোন বিকল্পগুলি পিকআপ এবং বিতরণের জন্য বা যানবাহনের গতির উপর নির্বাচন করা হয় তার উপর নির্ভর করে না। এটি সর্বাধিক প্রদত্ত সীমাবদ্ধতার পাশাপাশি নির্দিষ্ট করা যেতে পারে: সমাধানটি উভয় স্পেসিফিকেশনকে সম্মান করবে।

shipment_ type

string

এই চালানের জন্য একটি "টাইপ" নির্দিষ্ট করে অ-খালি স্ট্রিং। এই বৈশিষ্ট্যটি shipment_types মধ্যে অসম্পূর্ণতা বা প্রয়োজনীয়তাগুলি সংজ্ঞায়িত করতে ব্যবহার করা যেতে পারে ( ShipmentModel shipment_type_incompatibilities এবং shipment_type_requirements দেখুন)।

visit_types থেকে পৃথক যা একক দর্শনের জন্য নির্দিষ্ট করা আছে: একই চালানের সাথে সম্পর্কিত সমস্ত পিকআপ/বিতরণ একই shipment_type ভাগ করুন।

label

string

এই চালানের জন্য একটি লেবেল নির্দিষ্ট করে। এই লেবেলটি সংশ্লিষ্ট ShipmentRoute.Visit shipment_label প্রতিক্রিয়াতে রিপোর্ট করা হয়েছে।

ignore

bool

যদি সত্য হয় তবে এই চালানটি এড়িয়ে যান, তবে penalty_cost প্রয়োগ করবেন না।

মডেলটিতে কোনও shipment_type_requirements থাকে যখন একটি চালানের ফলাফলকে একটি বৈধতা ত্রুটির ফলাফল উপেক্ষা করে।

injected_first_solution_routes বা injected_solution_constraint সঞ্চালিত একটি চালান উপেক্ষা করা অনুমোদিত; সলভার পারফর্মিং রুট থেকে সম্পর্কিত পিকআপ/বিতরণ পরিদর্শনগুলি সরিয়ে দেয়। precedence_rules যে রেফারেন্স উপেক্ষা করে চালানগুলি উপেক্ষা করা হবে।

penalty_ cost

double

যদি চালানটি সম্পূর্ণ না করা হয় তবে এই জরিমানাটি রুটের সামগ্রিক ব্যয়ে যুক্ত করা হয়। যদি এর কোনও পিকআপ এবং বিতরণ বিকল্প পরিদর্শন করা হয় তবে একটি চালান সম্পূর্ণ হিসাবে বিবেচিত হয়। মডেলটিতে অন্যান্য সমস্ত ব্যয় সম্পর্কিত ক্ষেত্রগুলির জন্য ব্যবহৃত একই ইউনিটে ব্যয়টি প্রকাশ করা যেতে পারে এবং অবশ্যই ইতিবাচক হতে হবে।

গুরুত্বপূর্ণ : যদি এই জরিমানা নির্দিষ্ট না করা হয় তবে এটি অসীম হিসাবে বিবেচিত হয়, অর্থাত্ চালানটি অবশ্যই সম্পন্ন করতে হবে।

pickup_ to_ delivery_ relative_ detour_ limit

double

পিকআপ থেকে ডেলিভারি পর্যন্ত স্বল্পতম পথের তুলনায় সর্বাধিক আপেক্ষিক ডিটার সময় নির্দিষ্ট করে। যদি নির্দিষ্ট করা হয় তবে এটি অবশ্যই অবিচ্ছিন্ন হতে হবে এবং চালানের অবশ্যই কমপক্ষে একটি পিকআপ এবং একটি বিতরণ থাকতে হবে।

উদাহরণস্বরূপ, নির্বাচিত পিকআপ বিকল্প থেকে সরাসরি নির্বাচিত বিতরণ বিকল্পের দিকে যাওয়ার জন্য সবচেয়ে কম সময় নেওয়া উচিত। তারপরে pickup_to_delivery_relative_detour_limit প্রয়োগ করে:

start_time(delivery) - start_time(pickup) <=
std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit))

যদি উভয়ই আপেক্ষিক এবং পরম সীমা একই চালানিতে নির্দিষ্ট করা হয় তবে প্রতিটি সম্ভাব্য পিকআপ/বিতরণ জুটির জন্য আরও সীমাবদ্ধ সীমা ব্যবহার করা হয়। 2017/10 হিসাবে, যখন ভ্রমণের সময়সীমা যানবাহনের উপর নির্ভর করে না তখন ডিটারগুলি কেবল তখনই সমর্থিত হয়।

লোড

ভিজিট করার সময়, একটি পিকআপ হলে গাড়ির লোডে একটি পূর্বনির্ধারিত পরিমাণ যুক্ত করা যেতে পারে, বা এটি সরবরাহ করা হলে বিয়োগ করা যেতে পারে। এই বার্তাটি এ জাতীয় পরিমাণ সংজ্ঞায়িত করে। load_demands দেখুন।

ক্ষেত্র
amount

int64

সংশ্লিষ্ট ভিজিট সম্পাদনকারী যানবাহনের লোড যার দ্বারা পৃথক হবে। যেহেতু এটি একটি পূর্ণসংখ্যা, তাই ব্যবহারকারীদের নির্ভুলতা হ্রাস এড়াতে উপযুক্ত ইউনিট বেছে নেওয়ার পরামর্শ দেওয়া হয়। অবশ্যই ≥ 0 হতে হবে।

ভিজিটরেকুয়েস্ট দেখুন

কোনও যানবাহন দ্বারা করা যেতে পারে এমন একটি দেখার জন্য অনুরোধ করুন: এটিতে একটি ভূ-অবস্থান রয়েছে (বা দুটি, নীচে দেখুন), সময় উইন্ডোজ দ্বারা প্রতিনিধিত্ব করা এবং বন্ধ করার সময়গুলি এবং একটি পরিষেবার সময়কাল সময় (গাড়িটি একবার পিকআপ বা পণ্য বাদ দেওয়ার জন্য এসে যাওয়ার সময় ব্যয় করা সময়)।

ক্ষেত্র
arrival_ location

LatLng

এই VisitRequest সম্পাদন করার সময় যানবাহনটি যেখানে যান। যদি চালানের মডেলটির সময়কাল দূরত্বের ম্যাট্রিক থাকে তবে arrival_location অবশ্যই নির্দিষ্ট করা উচিত নয়।

arrival_ waypoint

Waypoint

এই VisitRequest সম্পাদন করার সময় যানবাহনটি যেখানে পৌঁছেছে সেই পথটি। যদি চালানের মডেলটির সময়কাল দূরত্বের ম্যাট্রিক থাকে তবে arrival_waypoint নির্দিষ্ট করা উচিত নয়।

departure_ location

LatLng

ভূ-অবস্থান যেখানে এই VisitRequest শেষ করার পরে যানবাহনটি চলে যায়। এটি arrival_location সমান হলে বাদ দেওয়া যেতে পারে। যদি চালানের মডেলটির সময়কাল দূরত্বের ম্যাট্রিক থাকে তবে departure_location অবশ্যই নির্দিষ্ট করা উচিত নয়।

departure_ waypoint

Waypoint

এই VisitRequest শেষ করার পরে যানবাহনটি যেখানে চলে যায় সেই পথটি। যদি এটি arrival_waypoint মতো হয় তবে বাদ দেওয়া যেতে পারে। যদি চালানের মডেলটির সময়কাল দূরত্বের ম্যাট্রিক থাকে তবে departure_waypoint নির্দিষ্ট করা উচিত নয়।

tags[]

string

ভিজিট অনুরোধের সাথে সংযুক্ত ট্যাগগুলি নির্দিষ্ট করে। খালি বা সদৃশ স্ট্রিং অনুমোদিত নয়।

time_ windows[]

TimeWindow

টাইম উইন্ডোজ যা একটি দর্শন সময় আগমনের সময়কে সীমাবদ্ধ করে। নোট করুন যে কোনও যানবাহন আগমনের সময় উইন্ডোর বাইরে চলে যেতে পারে, অর্থাত্ আগমনের সময় + সময়কাল কোনও সময় উইন্ডোর ভিতরে থাকার দরকার নেই। TimeWindow.start_time আগে গাড়িটি উপস্থিত হলে এটি অপেক্ষা করার সময় হতে পারে।

TimeWindow অনুপস্থিতির অর্থ হ'ল গাড়িটি যে কোনও সময় এই দর্শনটি সম্পাদন করতে পারে।

টাইম উইন্ডোজ অবশ্যই বিরক্ত হতে হবে, অর্থাত্ কোনও সময় উইন্ডো অবশ্যই অন্যের সাথে ওভারল্যাপ করতে হবে বা অন্য সংলগ্ন হতে হবে এবং সেগুলি অবশ্যই ক্রমবর্ধমান ক্রমে থাকতে হবে।

cost_per_hour_after_soft_end_time এবং soft_end_time কেবল তখনই সেট করা যেতে পারে যদি কোনও একক সময় উইন্ডো থাকে।

duration

Duration

ভিজিটের সময়কাল, অর্থাত্ আগমন এবং প্রস্থানের মধ্যে যানবাহন দ্বারা ব্যয় করা সময় (সম্ভাব্য অপেক্ষার সময়টিতে যুক্ত হতে হবে; time_windows দেখুন)।

cost

double

কোনও যানবাহনের রুটে এই ভিজিট অনুরোধটি পরিষেবা দিতে ব্যয়। এটি প্রতিটি বিকল্প পিকআপ বা চালানের সরবরাহের জন্য বিভিন্ন ব্যয় দিতে ব্যবহার করা যেতে পারে। এই ব্যয়টি অবশ্যই Shipment.penalty_cost মতো একই ইউনিটে থাকতে হবে en

load_ demands

map<string, Load >

এই ভিজিট অনুরোধের দাবি লোড। এটি Shipment Shipment.load_demands মতো VisitRequest এখানে তালিকাভুক্ত দাবিগুলি Shipment.load_demands তালিকাভুক্ত দাবিগুলিতে যুক্ত করা হয়েছে Load লোড_ডেম্যান্ডস।

visit_ types[]

string

ভিজিটের ধরণগুলি নির্দিষ্ট করে। এটি কোনও যানবাহন এই দর্শনটি সম্পূর্ণ করার জন্য প্রয়োজনীয় অতিরিক্ত সময় বরাদ্দ করতে ব্যবহৃত হতে পারে (দেখুন Vehicle.extra_visit_duration_for_visit_type )।

একটি প্রকার কেবল একবার উপস্থিত হতে পারে।

label

string

এই VisitRequest জন্য একটি লেবেল নির্দিষ্ট করে। এই লেবেলটি সংশ্লিষ্ট ShipmentRoute.Visit visit_label হিসাবে প্রতিক্রিয়াতে রিপোর্ট করা হয়েছে।

শিপমেন্টমোডেল

একটি চালানের মডেলটিতে শিপমেন্টের একটি সেট রয়েছে যা সামগ্রিক ব্যয়কে হ্রাস করার সময় যানবাহনের একটি সেট দ্বারা সম্পাদন করতে হবে, যা এর যোগফল:

  • যানবাহনগুলি রাউটিংয়ের ব্যয় (মোট সময় প্রতি ব্যয়ের যোগফল, ভ্রমণের সময় প্রতি ব্যয় এবং সমস্ত যানবাহনের উপর নির্ধারিত ব্যয়)।
  • অপ্রয়োজনীয় চালানের জরিমানা।
  • চালানের বৈশ্বিক সময়কালের ব্যয়
ক্ষেত্র
shipments[]

Shipment

শিপমেন্টের সেট যা অবশ্যই মডেলটিতে সম্পাদন করা উচিত।

vehicles[]

Vehicle

যানবাহনের সেট যা ভিজিট সম্পাদন করতে ব্যবহার করা যেতে পারে।

global_ start_ time

Timestamp

মডেলটির গ্লোবাল স্টার্ট এবং শেষ সময়: এই পরিসরের বাইরে কোনও সময় বৈধ হিসাবে বিবেচিত হতে পারে না।

মডেলের সময়কাল অবশ্যই এক বছরেরও কম হতে হবে, অর্থাত্ global_end_time এবং global_start_time অবশ্যই একে অপরের 31536000 সেকেন্ডের মধ্যে হওয়া উচিত।

cost_per_*hour ক্ষেত্রগুলি ব্যবহার করার সময়, আপনি পারফরম্যান্স বাড়ানোর জন্য এই উইন্ডোটি একটি ছোট ব্যবধানে সেট করতে চাইতে পারেন (যেমন আপনি যদি একদিনের মডেল করেন তবে আপনার সেই দিনটিতে বিশ্বব্যাপী সময়সীমা নির্ধারণ করা উচিত)। যদি আনসেট হয়, 00:00:00 ইউটিসি, 1 জানুয়ারী, 1970 (অর্থাত্ সেকেন্ডস: 0, ন্যানোস: 0) ডিফল্ট হিসাবে ব্যবহৃত হয়।

global_ end_ time

Timestamp

যদি আনসেট হয়, 00:00:00 ইউটিসি, 1 জানুয়ারী, 1971 (অর্থাত্ সেকেন্ডস: 31536000, ন্যানোস: 0) ডিফল্ট হিসাবে ব্যবহৃত হয়।

global_ duration_ cost_ per_ hour

double

সামগ্রিক পরিকল্পনার "বৈশ্বিক সময়কাল" হ'ল প্রাথমিকতম কার্যকর শুরুর সময় এবং সমস্ত যানবাহনের সর্বশেষ কার্যকর শেষ সময়ের মধ্যে পার্থক্য। উদাহরণস্বরূপ, প্রথম দিকের কাজ সমাপ্তির জন্য চেষ্টা এবং অনুকূল করার জন্য ব্যবহারকারীরা সেই পরিমাণকে প্রতি ঘন্টা ব্যয় নির্ধারণ করতে পারেন। এই ব্যয়টি অবশ্যই Shipment.penalty_cost মতো একই ইউনিটে থাকতে হবে en

duration_ distance_ matrices[]

DurationDistanceMatrix

মডেলটিতে ব্যবহৃত সময়কাল এবং দূরত্ব ম্যাট্রিকগুলি নির্দিষ্ট করে। যদি এই ক্ষেত্রটি খালি থাকে তবে গুগল ম্যাপস বা জিওডেসিক দূরত্বগুলি পরিবর্তে ব্যবহার করা হবে, use_geodesic_distances ক্ষেত্রের মানের উপর নির্ভর করে। যদি এটি খালি না থাকে তবে use_geodesic_distances সত্য হতে পারে না এবং duration_distance_matrix_src_tags বা duration_distance_matrix_dst_tags খালি থাকতে পারে না।

ব্যবহারের উদাহরণ:

  • দুটি অবস্থান রয়েছে: লোকা এবং লোকব।
  • 1 যানবাহন লোকায় তার রুট শুরু করে এবং এটি লোকায় শেষ করে।
  • 1 পিকআপ ভিজিট ভিজিট রিকোয়েস্ট এলওবিটিতে।
model {
  vehicles { start_tags: "locA"  end_tags: "locA" }
  shipments { pickups { tags: "locB" } }
  duration_distance_matrix_src_tags: "locA"
  duration_distance_matrix_src_tags: "locB"
  duration_distance_matrix_dst_tags: "locA"
  duration_distance_matrix_dst_tags: "locB"
  duration_distance_matrices {
    rows {  # from: locA
      durations { seconds: 0 }   meters: 0    # to: locA
      durations { seconds: 100 } meters: 1000 # to: locB
    }
    rows {  # from: locB
      durations { seconds: 102 } meters: 990 # to: locA
      durations { seconds: 0 }   meters: 0   # to: locB
    }
  }
}
  • এখানে তিনটি অবস্থান রয়েছে: লোকা, লোকেবি এবং লোকসি।
  • 1 যানবাহন লোকায় তার রুট শুরু করে এবং এটি লকবিতে শেষ করে, ম্যাট্রিক্স "ফাস্ট" ব্যবহার করে।
  • 1 যানবাহনটি লকব -এ তার রুটটি শুরু করে এবং এটি ম্যাট্রিক্স "স্লো" ব্যবহার করে লকবিতে শেষ করে।
  • 1 যানবাহন লকব এ তার রুটটি শুরু করে এবং এটি লকবিতে শেষ করে, ম্যাট্রিক্স "ফাস্ট" ব্যবহার করে।
  • 1 পিকআপ ভিজিট ভিজিট রিকোয়েস্ট এলওসিসি।
model {
  vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
  vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
  vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
  shipments { pickups { tags: "locC" } }
  duration_distance_matrix_src_tags: "locA"
  duration_distance_matrix_src_tags: "locB"
  duration_distance_matrix_src_tags: "locC"
  duration_distance_matrix_dst_tags: "locB"
  duration_distance_matrix_dst_tags: "locC"
  duration_distance_matrices {
    vehicle_start_tag: "fast"
    rows {  # from: locA
      durations { seconds: 1000 } meters: 2000 # to: locB
      durations { seconds: 600 }  meters: 1000 # to: locC
    }
    rows {  # from: locB
      durations { seconds: 0 }   meters: 0    # to: locB
      durations { seconds: 700 } meters: 1200 # to: locC
    }
    rows {  # from: locC
      durations { seconds: 702 } meters: 1190 # to: locB
      durations { seconds: 0 }   meters: 0    # to: locC
    }
  }
  duration_distance_matrices {
    vehicle_start_tag: "slow"
    rows {  # from: locA
      durations { seconds: 1800 } meters: 2001 # to: locB
      durations { seconds: 900 }  meters: 1002 # to: locC
    }
    rows {  # from: locB
      durations { seconds: 0 }    meters: 0    # to: locB
      durations { seconds: 1000 } meters: 1202 # to: locC
    }
    rows {  # from: locC
      durations { seconds: 1001 } meters: 1195 # to: locB
      durations { seconds: 0 }    meters: 0    # to: locC
    }
  }
}
duration_ distance_ matrix_ src_ tags[]

string

সময়কাল এবং দূরত্বের ম্যাট্রিকগুলির উত্সগুলি সংজ্ঞায়িত ট্যাগগুলি; duration_distance_matrices(i).rows(j) ট্যাগ duration_distance_matrix_src_tags(j) এর সাথে পরিদর্শন থেকে সময়কাল এবং দূরত্বগুলি ম্যাট্রিক্স I এর অন্যান্য পরিদর্শনগুলিতে সংজ্ঞায়িত করে।

ট্যাগগুলি VisitRequest.tags বা Vehicle.start_tags সাথে সম্পর্কিত। প্রদত্ত VisitRequest বা Vehicle অবশ্যই এই ক্ষেত্রে ঠিক একটি ট্যাগের সাথে মেলে। নোট করুন যে কোনও Vehicle উত্স, গন্তব্য এবং ম্যাট্রিক্স ট্যাগ একই হতে পারে; একইভাবে একটি VisitRequest উত্স এবং গন্তব্য ট্যাগগুলি একই হতে পারে। সমস্ত ট্যাগ অবশ্যই আলাদা হতে হবে এবং খালি স্ট্রিং হতে পারে না। যদি এই ক্ষেত্রটি খালি না থাকে তবে duration_distance_matrices খালি থাকা উচিত নয়।

duration_ distance_ matrix_ dst_ tags[]

string

সময়কাল এবং দূরত্বের ম্যাট্রিকগুলির গন্তব্যগুলি সংজ্ঞায়িত ট্যাগগুলি; duration_distance_matrices(i).rows(j).durations(k) ) (রেস। সময়কাল_ডিস্ট্যান্স_ম্যাট্রিক্স (আই)। রো ( duration_distance_matrix_src_tags(j) duration_distance_matrices(i).rows(j).meters(k)) ট্যাগের সাথে ভিজিট থেকে ভিজিট থেকে ভ্রমণের সময়কাল (রেস। দূরত্ব) সংজ্ঞায়িত করে duration_distance_matrix_dst_tags(k) ম্যাট্রিক্স i।

ট্যাগগুলি VisitRequest.tags বা Vehicle.start_tags সাথে সম্পর্কিত। প্রদত্ত VisitRequest বা Vehicle অবশ্যই এই ক্ষেত্রে ঠিক একটি ট্যাগের সাথে মেলে। নোট করুন যে কোনও Vehicle উত্স, গন্তব্য এবং ম্যাট্রিক্স ট্যাগ একই হতে পারে; একইভাবে একটি VisitRequest উত্স এবং গন্তব্য ট্যাগগুলি একই হতে পারে। সমস্ত ট্যাগ অবশ্যই আলাদা হতে হবে এবং খালি স্ট্রিং হতে পারে না। যদি এই ক্ষেত্রটি খালি না থাকে তবে duration_distance_matrices খালি থাকা উচিত নয়।

transition_ attributes[]

TransitionAttributes

মডেলটিতে রূপান্তর বৈশিষ্ট্য যুক্ত করা হয়েছে।

shipment_ type_ incompatibilities[]

ShipmentTypeIncompatibility

বেমানান শিপমেন্ট_ টাইপগুলির সেটগুলি ( ShipmentTypeIncompatibility দেখুন)।

shipment_ type_ requirements[]

ShipmentTypeRequirement

shipment_type প্রয়োজনীয়তার সেটগুলি ( ShipmentTypeRequirement দেখুন)।

precedence_ rules[]

PrecedenceRule

অগ্রাধিকার বিধিগুলির সেট যা অবশ্যই মডেলটিতে প্রয়োগ করা উচিত।

গুরুত্বপূর্ণ : অগ্রাধিকার নিয়মের ব্যবহার সমস্যার আকারকে সীমাবদ্ধ করে যা অনুকূলিত করা যায়। অনেক চালান অন্তর্ভুক্ত অগ্রাধিকার বিধি ব্যবহার করে অনুরোধগুলি প্রত্যাখ্যান করা যেতে পারে।

max_ active_ vehicles

int32

সক্রিয় যানবাহনের সর্বাধিক সংখ্যাকে সীমাবদ্ধ করে। কোনও যানবাহন সক্রিয় থাকে যদি এর রুটটি কমপক্ষে একটি চালান সম্পাদন করে। এটি যানবাহনের চেয়ে কম ড্রাইভার রয়েছে এবং যানবাহনের বহরটি ভিন্নধর্মী এমন ক্ষেত্রে রুটের সংখ্যা সীমাবদ্ধ করতে ব্যবহার করা যেতে পারে। অপ্টিমাইজেশন তারপরে ব্যবহারের জন্য যানবাহনের সেরা উপসেটটি নির্বাচন করবে। কঠোরভাবে ইতিবাচক হতে হবে।

সময়কাল ডিস্ট্যান্টসেম্যাট্রিক্স

ভিজিট এবং যানবাহন শুরু করার অবস্থানগুলি এবং যানবাহন শেষের অবস্থানগুলি থেকে একটি সময়কাল এবং দূরত্বের ম্যাট্রিক্স নির্দিষ্ট করে।

ক্ষেত্র
rows[]

Row

সময়কাল এবং দূরত্বের ম্যাট্রিক্সের সারিগুলি নির্দিষ্ট করে। এটি অবশ্যই ShipmentModel.duration_distance_matrix_src_tags হিসাবে অনেক উপাদান থাকতে হবে DD

vehicle_ start_ tag

string

এই সময়কাল এবং দূরত্বের ম্যাট্রিক্স প্রয়োগ করে কোন যানবাহনগুলি সংজ্ঞায়িত করে ট্যাগ। যদি খালি হয় তবে এটি সমস্ত যানবাহনের ক্ষেত্রে প্রযোজ্য এবং কেবল একটি একক ম্যাট্রিক্স থাকতে পারে।

প্রতিটি যানবাহন শুরু করতে হবে ঠিক একটি ম্যাট্রিক্সের সাথে মেলে, অর্থাত্ তাদের start_tags ক্ষেত্রগুলির মধ্যে একটি অবশ্যই একটি ম্যাট্রিক্সের vehicle_start_tag সাথে মিলবে (এবং কেবলমাত্র সেই ম্যাট্রিক্সের)।

সমস্ত ম্যাট্রিক্সের অবশ্যই একটি আলাদা vehicle_start_tag থাকতে হবে।

সারি

সময়কাল এবং দূরত্বের ম্যাট্রিক্সের একটি সারি নির্দিষ্ট করে।

ক্ষেত্র
durations[]

Duration

একটি প্রদত্ত সারির জন্য সময়কাল মান। এটি অবশ্যই ShipmentModel.duration_distance_matrix_dst_tags হিসাবে অনেকগুলি উপাদান থাকতে হবে DD ডিউরেশন_ডিস্ট্যান্স_ম্যাট্রিক্স_ডিস্ট_ট্যাগগুলি।

meters[]

double

একটি প্রদত্ত সারির জন্য দূরত্বের মান। যদি কোনও ব্যয় বা সীমাবদ্ধতা মডেলটির দূরত্বগুলি উল্লেখ করে তবে এটি খালি রেখে দেওয়া যেতে পারে; অন্যথায় এটির durations মতো অনেকগুলি উপাদান থাকতে হবে।

পূর্ববর্তী

দুটি ইভেন্টের মধ্যে একটি অগ্রাধিকার নিয়ম (প্রতিটি ইভেন্ট হ'ল পিকআপ বা একটি চালানের বিতরণ): "দ্বিতীয়" ইভেন্টটি "প্রথম" শুরু হওয়ার পরে কমপক্ষে offset_duration শুরু করতে হবে।

বেশ কয়েকটি অগ্রাধিকার একই (বা সম্পর্কিত) ইভেন্টগুলিকে উল্লেখ করতে পারে, যেমন, "বি এর পিকআপ একটি সরবরাহের পরে ঘটে" এবং "সি এর পিকআপ বি পিকআপের পরে ঘটে"।

তদ্ব্যতীত, উভয় চালান সম্পাদন করা হয় এবং অন্যথায় উপেক্ষা করা হয় কেবল তখনই প্রযোজ্য প্রযোজ্য।

ক্ষেত্র
first_ is_ delivery

bool

"প্রথম" ইভেন্টটি যদি বিতরণ হয় তা নির্দেশ করে।

second_ is_ delivery

bool

"দ্বিতীয়" ইভেন্টটি যদি ডেলিভারি হয় তা নির্দেশ করে।

offset_ duration

Duration

"প্রথম" এবং "দ্বিতীয়" ইভেন্টের মধ্যে অফসেট। এটি নেতিবাচক হতে পারে।

first_ index

int32

"প্রথম" ইভেন্টের চালান সূচক। এই ক্ষেত্রটি অবশ্যই নির্দিষ্ট করা উচিত।

second_ index

int32

"দ্বিতীয়" ইভেন্টের চালান সূচক। এই ক্ষেত্রটি অবশ্যই নির্দিষ্ট করা উচিত।

শিপমেন্ট রুট

একটি গাড়ির রুটটি সময়ের অক্ষের সাথে পচে যেতে পারে, এর মতো (আমরা ধরে নিই যে এন ভিজিট রয়েছে):

  |            |            |          |       |  T[2], |        |      |
  | Transition |  Visit #0  |          |       |  V[2], |        |      |
  |     #0     |    aka     |   T[1]   |  V[1] |  ...   | V[n-1] | T[n] |
  |  aka T[0]  |    V[0]    |          |       | V[n-2],|        |      |
  |            |            |          |       | T[n-1] |        |      |
  ^            ^            ^          ^       ^        ^        ^      ^
vehicle    V[0].start   V[0].end     V[1].   V[1].    V[n].    V[n]. vehicle
 start     (arrival)   (departure)   start   end      start    end     end

নোট করুন যে আমরা এর মধ্যে একটি পার্থক্য তৈরি করি:

  • "সময়োপযোগী ইভেন্টগুলি", যেমন যানবাহন শুরু এবং শেষ এবং প্রতিটি ভিজিটের শুরু এবং শেষ (ওরফে আগমন এবং প্রস্থান)। তারা একটি নির্দিষ্ট দ্বিতীয় সময়ে ঘটে।
  • "সময় অন্তর", যেমন ভিজিট নিজেরাই এবং দর্শনগুলির মধ্যে রূপান্তর। যদিও সময়ের ব্যবধানগুলি কখনও কখনও শূন্য সময়কাল থাকতে পারে, অর্থাত্ একই সেকেন্ডে শুরু এবং শেষ হয়, তাদের প্রায়শই ইতিবাচক সময়কাল থাকে।

অপরিবর্তনীয়:

  • যদি এন ভিজিট থাকে তবে এন+1 ট্রানজিশন রয়েছে।
  • একটি দর্শন সর্বদা এটির (একই সূচক) এবং এর পরে একটি ট্রানজিশন (সূচক + 1) এর আগে একটি রূপান্তর দ্বারা বেষ্টিত থাকে।
  • যানবাহন শুরু সর্বদা স্থানান্তর #0 দ্বারা অনুসরণ করা হয়।
  • গাড়ির শেষটি সর্বদা #এন ট্রানজিশনের আগে থাকে।

জুম ইন, এখানে একটি Transition এবং Visit চলাকালীন যা ঘটে তা এখানে:

---+-------------------------------------+-----------------------------+-->
   |           TRANSITION[i]             |           VISIT[i]          |
   |                                     |                             |
   |  * TRAVEL: the vehicle moves from   |      PERFORM the visit:     |
   |    VISIT[i-1].departure_location to |                             |
   |    VISIT[i].arrival_location, which |  * Spend some time:         |
   |    takes a given travel duration    |    the "visit duration".    |
   |    and distance                     |                             |
   |                                     |  * Load or unload           |
   |  * BREAKS: the driver may have      |    some quantities from the |
   |    breaks (e.g. lunch break).       |    vehicle: the "demand".   |
   |                                     |                             |
   |  * WAIT: the driver/vehicle does    |                             |
   |    nothing. This can happen for     |                             |
   |    many reasons, for example when   |                             |
   |    the vehicle reaches the next     |                             |
   |    event's destination before the   |                             |
   |    start of its time window         |                             |
   |                                     |                             |
   |  * DELAY: *right before* the next   |                             |
   |    arrival. E.g. the vehicle and/or |                             |
   |    driver spends time unloading.    |                             |
   |                                     |                             |
---+-------------------------------------+-----------------------------+-->
   ^                                     ^                             ^
V[i-1].end                           V[i].start                    V[i].end

শেষ অবধি, এখানে কীভাবে ভ্রমণ, বিরতি, বিলম্ব এবং অপেক্ষা করার সময়টি কোনও পরিবর্তনের সময় সাজানো যেতে পারে।

  • তারা ওভারল্যাপ না.
  • বিলম্বটি অনন্য এবং পরবর্তী দর্শন (বা যানবাহনের শেষ) এর ঠিক আগে অবশ্যই একটি স্বচ্ছ সময় হতে হবে । সুতরাং, এর শুরু এবং শেষ সময়টি জানতে বিলম্বের সময়কালটি জানতে যথেষ্ট।
  • বিরতিগুলি স্বচ্ছ, অ-ওভারল্যাপিং সময়কাল। প্রতিক্রিয়া প্রতিটি বিরতির শুরু সময় এবং সময়কাল নির্দিষ্ট করে।
  • ভ্রমণ এবং অপেক্ষা "প্রিম্পেমেবল": এই সংক্রমণের সময় এগুলি বেশ কয়েকবার বাধা দেওয়া যেতে পারে। ক্লায়েন্টরা ধরে নিতে পারেন যে ভ্রমণ "যত তাড়াতাড়ি সম্ভব" ঘটে এবং "অপেক্ষা করুন" বাকি সময়টি পূরণ করে।

একটি (জটিল) উদাহরণ:

                               TRANSITION[i]
--++-----+-----------------------------------------------------------++-->
  ||     |       |           |       |           |         |         ||
  ||  T  |   B   |     T     |       |     B     |         |    D    ||
  ||  r  |   r   |     r     |   W   |     r     |    W    |    e    ||
  ||  a  |   e   |     a     |   a   |     e     |    a    |    l    ||
  ||  v  |   a   |     v     |   i   |     a     |    i    |    a    ||
  ||  e  |   k   |     e     |   t   |     k     |    t    |    y    ||
  ||  l  |       |     l     |       |           |         |         ||
  ||     |       |           |       |           |         |         ||
--++-----------------------------------------------------------------++-->
ক্ষেত্র
vehicle_ index

int32

সোর্স ShipmentModel এর সূচক দ্বারা চিহ্নিত রুটটি সম্পাদনকারী যানবাহন।

vehicle_ label

string

এই রুটটি সম্পাদনকারী গাড়ির লেবেল, ShipmentModel.vehicles(vehicle_index).label , যদি নির্দিষ্ট করা হয়।

vehicle_ start_ time

Timestamp

যে সময় যানটি তার রুট শুরু করে।

vehicle_ end_ time

Timestamp

যানবাহনটি তার রুটটি শেষ করে।

visits[]

Visit

কোনও রুটের প্রতিনিধিত্বকারী ভিজিটের ক্রম ক্রম। ভিজিট [i] রুটে আই-থে ভিজিট। যদি এই ক্ষেত্রটি খালি থাকে তবে যানটিকে অব্যবহৃত হিসাবে বিবেচনা করা হয়।

transitions[]

Transition

রুটের জন্য ট্রানজিশনের তালিকা অর্ডার করা।

has_ traffic_ infeasibilities

bool

যখন OptimizeToursRequest.consider_road_traffic সত্যে সেট করা হয়, এই ক্ষেত্রটি ইঙ্গিত দেয় যে রুটের সময়গুলিতে অসঙ্গতিগুলি ট্র্যাফিক-ভিত্তিক ভ্রমণ সময়কাল অনুমান ব্যবহার করে পূর্বাভাস দেওয়া হয়। প্রথম দেখার আগে, বা শেষ পরিদর্শন করার পরে ভিজিট এবং যানবাহনের সময় উইন্ডোগুলি সন্তুষ্ট করার সময় ট্র্যাফিক-সমন্বিত ভ্রমণ, বিলম্ব এবং ভিজিটের মধ্যে বিরতি শেষ করার জন্য পর্যাপ্ত সময় থাকতে পারে। যেমন,

  start_time(previous_visit) + duration(previous_visit) +
  travel_duration(previous_visit, next_visit) > start_time(next_visit)

ট্র্যাফিকের কারণে ট্র্যাভেল টাইম travel_duration(previous_visit, next_visit) এর বর্ধিত প্রাক্কলনের কারণে তার বর্তমান সময়ের উইন্ডোর চেয়ে পরবর্তী সময়টি সম্ভবত পরবর্তী সময়ে ঘটবে। এছাড়াও, ভ্রমণের সময় প্রাক্কলন বৃদ্ধির কারণে এবং সময় উইন্ডো বিধিনিষেধগুলি ভিজিট বা ভাঙার কারণে একটি বিরতি একটি ভিজিটের সাথে ওভারল্যাপ করতে বাধ্য হতে পারে।

route_ polyline

EncodedPolyline

রুটের এনকোডেড পললাইন উপস্থাপনা। এই ক্ষেত্রটি কেবল তখনই পপুলেশন করা হয় যদি OptimizeToursRequest.populate_polylines সত্যে সেট করা থাকে।

breaks[]

Break

এই রুটটি সম্পাদনকারী যানবাহনের জন্য নির্ধারিত বিরতি। breaks সিকোয়েন্সটি সময় অন্তরকে উপস্থাপন করে, প্রতিটি সংশ্লিষ্ট start_time এবং দীর্ঘস্থায়ী duration সেকেন্ডে শুরু হয়।

metrics

AggregatedMetrics

এই রুটের জন্য সময়কাল, দূরত্ব এবং লোড মেট্রিকগুলি। প্রসঙ্গের উপর নির্ভর করে সমস্ত ShipmentRoute.transitions . ট্রান্সিশনস বা ShipmentRoute.visits মাধ্যমে AggregatedMetrics ক্ষেত্রগুলি সংক্ষিপ্ত করা হয়।

route_ costs

map<string, double>

রুটের ব্যয়, ব্যয় সম্পর্কিত অনুরোধ ক্ষেত্রগুলি দ্বারা ভেঙে। কীগুলি হ'ল প্রোটো পাথ, ইনপুট অপ্টিমাইজটোর্স রিকোয়েস্টের সাথে সম্পর্কিত, যেমন "মডেল.শিপমেন্টস.পিকআপস.কোস্ট", এবং মানগুলি পুরো রুটের সাথে একত্রিত করা ব্যয় ক্ষেত্রের দ্বারা উত্পাদিত মোট ব্যয়। অন্য কথায়, ব্যয়গুলি ["মডেল.শিপমেন্টস.পিকআপস.কস্ট"] রুটে সমস্ত পিকআপ ব্যয়ের যোগফল। মডেলটিতে সংজ্ঞায়িত সমস্ত ব্যয়গুলি এখানে ট্রানজিশনঅ্যাট্রিবিউটগুলির সাথে সম্পর্কিত ব্যয় ব্যতীত বিশদভাবে প্রতিবেদন করা হয়েছে যা কেবলমাত্র 2022/01 হিসাবে সমষ্টিগত উপায়ে রিপোর্ট করা হয়েছে।

route_ total_ cost

double

রুটের মোট ব্যয়। ব্যয় মানচিত্রে সমস্ত ব্যয়ের যোগফল।

বিরতি

বিরতি কার্যকর করার প্রতিনিধিত্বকারী ডেটা।

ক্ষেত্র
start_ time

Timestamp

বিরতির শুরু সময়।

duration

Duration

বিরতির সময়কাল।

এনকোডেডপোলাইন

একটি পললাইনের এনকোডেড উপস্থাপনা। পললাইন এনকোডিং সম্পর্কিত আরও তথ্য এখানে পাওয়া যাবে: https://developers.google.com/maps/docamentation/utiviles/polylinealgorithm https://dewoogle.com/maps/docarctiction/javasprict/reference/geometry#encoding

ক্ষেত্র
points

string

পললাইনের এনকোডেড পয়েন্টগুলি উপস্থাপন করে স্ট্রিং।

উত্তরণ

রুটে দুটি ইভেন্টের মধ্যে রূপান্তর। ShipmentRoute বিবরণ দেখুন।

যদি গাড়ির কোনও start_location এবং/অথবা end_location না থাকে তবে সংশ্লিষ্ট ট্র্যাভেল মেট্রিকগুলি 0 হয়।

ক্ষেত্র
travel_ duration

Duration

এই রূপান্তরকালে ভ্রমণের সময়কাল।

travel_ distance_ meters

double

রূপান্তর চলাকালীন দূরত্ব ভ্রমণ।

traffic_ info_ unavailable

bool

যখন ট্র্যাফিকের জন্য OptimizeToursRequest.consider_road_traffic মাধ্যমে অনুরোধ করা হয় এবং ট্র্যাফিকের তথ্য কোনও Transition জন্য পুনরুদ্ধার করা যায় না, এই বুলিয়ানটি সত্যে সেট করা আছে। এটি অস্থায়ী হতে পারে (রিয়েলটাইম ট্র্যাফিক সার্ভারগুলিতে বিরল হিচাপ) বা স্থায়ী (এই অবস্থানের জন্য কোনও ডেটা নেই)।

delay_ duration

Duration

এই রূপান্তরটিতে প্রয়োগ করা বিলম্বের সময়কালের যোগফল। যদি কোনও হয় তবে বিলম্বটি পরবর্তী ইভেন্টের (ভিজিট বা যানবাহন শেষ) ঠিক আগে delay_duration সেকেন্ডের শুরু হয়। TransitionAttributes.delay দেখুন।

break_ duration

Duration

এই রূপান্তরকালে বিরতিগুলির সময়কালের যোগফল, যদি থাকে। প্রতিটি বিরতির শুরুর সময় এবং সময়কাল সম্পর্কে বিশদগুলি ShipmentRoute.breaks সংরক্ষণ করা হয়।

wait_ duration

Duration

এই রূপান্তরকালে অপেক্ষা করতে সময় ব্যয়। অপেক্ষা করার সময়কাল নিষ্ক্রিয় সময়ের সাথে মিলে যায় এবং বিরতির সময় অন্তর্ভুক্ত করে না। এছাড়াও নোট করুন যে এই অপেক্ষার সময়টি বেশ কয়েকটি অ-স্বচ্ছল ব্যবধানে বিভক্ত হতে পারে।

total_ duration

Duration

সুবিধার জন্য সরবরাহ করা রূপান্তরটির মোট সময়কাল। এটি সমান:

  • পরবর্তী ভিজিট start_time (বা vehicle_end_time যদি এটি সর্বশেষ রূপান্তর হয়) - এই ট্রানজিশনের start_time ;
  • যদি ShipmentRoute.has_traffic_infeasibilities মিথ্যা হয় তবে নিম্নলিখিতটি অতিরিক্তভাবে ধরে রয়েছে: `মোট_ডারেশন = ট্র্যাভেল_ডিউরেশন + বিলম্ব_করণের জন্য
  • ব্রেক_ডারেশন + ওয়েট_ডিউরেশনু `
start_ time

Timestamp

এই রূপান্তর শুরু সময়।

route_ polyline

EncodedPolyline

ট্রানজিশনের সময় অনুসরণ করা রুটের এনকোডেড পললাইন উপস্থাপনা। এই ক্ষেত্রটি কেবল তখনই পপুলেটেড হয় যদি populate_transition_polylines সত্যে সেট করা থাকে।

route_ token

string

শুধুমাত্র আউটপুট। একটি অস্বচ্ছ টোকেন যা নেভিগেশন চলাকালীন রুটটি পুনর্গঠনের জন্য নেভিগেশন এসডিকে পাস করা যেতে পারে এবং পুনরায় চালু করার ক্ষেত্রে, রুটটি তৈরি হওয়ার সময় মূল অভিপ্রায়কে সম্মান করুন। এই টোকেনটিকে অস্বচ্ছ ব্লব হিসাবে বিবেচনা করুন। অনুরোধগুলি জুড়ে এর মানটির তুলনা করবেন না কারণ পরিষেবাটি ঠিক একই রুটটি ফিরিয়ে দিলেও এর মান পরিবর্তন হতে পারে। এই ক্ষেত্রটি কেবল তখনই পপুলেটেড হয় যদি populate_transition_polylines সত্যে সেট করা থাকে।

vehicle_ loads

map<string, VehicleLoad >

এই ট্রানজিশনের সময় যানবাহন লোড হয় Shipment.load_demands প্রতিটি ধরণের জন্য যা এই গাড়ির গাড়িতে প্রদর্শিত হয় Vehicle.load_limits

প্রথম স্থানান্তরের সময় লোডগুলি হ'ল যানবাহনের রুটের প্রারম্ভিক লোড। তারপরে, প্রতিটি দেখার পরে, ভিজিটটি পিকআপ বা ডেলিভারি ছিল কিনা তার উপর নির্ভর করে ভিজিটের load_demands পরবর্তী ট্রানজিশনের লোডগুলি পেতে যুক্ত বা বিয়োগ করা হয়।

যানবাহন লোড

প্রদত্ত ধরণের জন্য রুট বরাবর কোনও পর্যায়ে গাড়ির আসল লোডের প্রতিবেদন করে (দেখুন Transition.vehicle_loads )।

ক্ষেত্র
amount

int64

প্রদত্ত ধরণের জন্য গাড়িতে লোডের পরিমাণ। লোডের এককটি সাধারণত প্রকারের দ্বারা নির্দেশিত হয়। ট্রানজিশন দেখুন Transition.vehicle_loads

ভিজিট করুন

একটি রুট চলাকালীন একটি দর্শন করা হয়েছিল। এই ভিজিট একটি পিকআপ বা Shipment সরবরাহের সাথে মিলে যায়।

ক্ষেত্র
shipment_ index

int32

উত্স ShipmentModel shipments ক্ষেত্রের সূচক।

is_ pickup

bool

যদি সত্য হয় তবে দর্শনটি Shipment পিকআপের সাথে মিলে যায়। অন্যথায়, এটি একটি প্রসবের সাথে মিলে যায়।

visit_ request_ index

int32

Shipment পিকআপ বা বিতরণ ক্ষেত্রে উভয়ই VisitRequest সূচক (দেখুন is_pickup )।

start_ time

Timestamp

সময় যেখানে দর্শন শুরু হয়। নোট করুন যে যানটি ভিজিটের স্থানে এর চেয়ে আগে আসতে পারে। সময়গুলি ShipmentModel সাথে সামঞ্জস্যপূর্ণ।

load_ demands

map<string, Load >

চালানের যোগফল এবং ভিজিট অনুরোধ load_demands হিসাবে মোট ভিজিট লোড চাহিদা। ভিজিট ডেলিভারি হলে মানগুলি নেতিবাচক। Transition.loads মতো একই ধরণের জন্য দাবিগুলি রিপোর্ট করা হয় Load লোড (এই ক্ষেত্রটি দেখুন)।

detour

Duration

ভিজিটের আগে রুটে শিপমেন্টগুলি পরিদর্শন করার কারণে এবং সময় উইন্ডোজ দ্বারা প্ররোচিত সম্ভাব্য অপেক্ষার সময়টিতে অতিরিক্ত ডিটোর সময়। যদি ভিজিটটি ডেলিভারি হয় তবে ডিটোরটি সংশ্লিষ্ট পিকআপ ভিজিট থেকে গণনা করা হয় এবং এর সমান:

start_time(delivery) - start_time(pickup)
- (duration(pickup) + travel duration from the pickup location
to the delivery location).

অন্যথায়, এটি যানবাহন start_location থেকে গণনা করা হয় এবং এর সমান:

start_time - vehicle_start_time - travel duration from
the vehicle's `start_location` to the visit.
shipment_ label

string

সংশ্লিষ্ট Shipment.label অনুলিপি.লাবেল, Shipment নির্দিষ্ট করা থাকলে।

visit_ label

string

সংশ্লিষ্ট VisitRequest.label অনুলিপি, যদি VisitRequest নির্দিষ্ট করা হয়।

শিপমেন্ট টাইপিংকম্প্যাটিবিলিটি

তাদের চালান_ টাইপের উপর নির্ভর করে চালানের মধ্যে অসঙ্গতিগুলি নির্দিষ্ট করে। একই রুটে বেমানান শিপমেন্টের উপস্থিতি অসঙ্গতি মোডের ভিত্তিতে সীমাবদ্ধ।

ক্ষেত্র
types[]

string

বেমানান ধরণের তালিকা। তালিকাভুক্তদের মধ্যে বিভিন্ন shipment_types টাইপযুক্ত দুটি চালান "বেমানান"।

incompatibility_ mode

IncompatibilityMode

মোডটি অসম্পূর্ণতার জন্য প্রয়োগ করা হয়েছে।

অসঙ্গতিমোড

কীভাবে বেমানান শিপমেন্টের উপস্থিতি একই রুটে সীমাবদ্ধ রয়েছে তা সংজ্ঞায়িত মোডগুলি।

Enums
INCOMPATIBILITY_MODE_UNSPECIFIED অনির্ধারিত অসঙ্গতি মোড। এই মানটি কখনই ব্যবহার করা উচিত নয়।
NOT_PERFORMED_BY_SAME_VEHICLE এই মোডে, বেমানান ধরণের দুটি শিপমেন্ট কখনই একই যানবাহন ভাগ করতে পারে না।
NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY

NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY অসম্পূর্ণতা মোডের সাথে বেমানান ধরণের দুটি শিপমেন্টের জন্য:

  • যদি উভয়ই কেবল পিকআপ হয় (কোনও বিতরণ নেই) বা কেবল বিতরণ (কোনও পিকআপ নেই), তারা একই যানবাহনটি মোটেই ভাগ করতে পারে না।
  • যদি শিপমেন্টগুলির মধ্যে একটির ডেলিভারি থাকে এবং অন্যটি একটি পিকআপ থাকে তবে দুটি শিপমেন্ট একই গাড়িটি ভাগ করতে পারে যদি পূর্ববর্তী চালানটি পরবর্তীটি বাছাইয়ের আগে সরবরাহ করা হয়।

শিপমেন্ট টাইপেয়ারকায়ারমেন্ট

তাদের চালান_ টাইপের উপর ভিত্তি করে চালানের মধ্যে প্রয়োজনীয়তা নির্দিষ্ট করে। প্রয়োজনীয়তার স্পেসিফিকেশনগুলি প্রয়োজনীয়তা মোড দ্বারা সংজ্ঞায়িত করা হয়।

ক্ষেত্র
required_ shipment_ type_ alternatives[]

string

dependent_shipment_types টাইপস দ্বারা প্রয়োজনীয় বিকল্প চালানের ধরণের তালিকা।

dependent_ shipment_ types[]

string

dependent_shipment_types ফিল্ডে কোনও ধরণের সহ সমস্ত শিপমেন্টের জন্য একই রুটে দেখার জন্য required_shipment_type_alternatives কমপক্ষে একটি চালানের প্রয়োজন।

দ্রষ্টব্য: প্রয়োজনীয়তার চেইনগুলি যেমন একটি shipment_type নিজের উপর নির্ভর করে তা অনুমোদিত নয়।

requirement_ mode

RequirementMode

প্রয়োজনীয়তার জন্য মোড প্রয়োগ করা হয়েছে।

প্রয়োজনীয়মোড

কোনও রুটে নির্ভরশীল চালানের উপস্থিতি সংজ্ঞায়িত মোডগুলি।

Enums
REQUIREMENT_MODE_UNSPECIFIED অনির্ধারিত প্রয়োজনীয়তা মোড। এই মানটি কখনই ব্যবহার করা উচিত নয়।
PERFORMED_BY_SAME_VEHICLE এই মোডে, সমস্ত "নির্ভরশীল" শিপমেন্ট অবশ্যই তাদের "প্রয়োজনীয়" শিপমেন্টগুলির মধ্যে কমপক্ষে একটি হিসাবে একই যানবাহন ভাগ করে নিতে হবে।
IN_SAME_VEHICLE_AT_PICKUP_TIME

IN_SAME_VEHICLE_AT_PICKUP_TIME মোডের সাথে, সমস্ত "নির্ভরশীল" চালানের পিকআপের সময় তাদের গাড়ীতে কমপক্ষে একটি "প্রয়োজনীয়" চালান থাকা দরকার।

একটি "নির্ভরশীল" চালানের পিকআপের অবশ্যই অবশ্যই থাকতে হবে:

  • একটি ডেলিভারি-কেবলমাত্র "প্রয়োজনীয়" চালানটি পরে রুটে বিতরণ করা হয়, বা
  • একটি "প্রয়োজনীয়" চালান তার আগে রুটে উঠেছে এবং যদি "প্রয়োজনীয়" চালানের একটি বিতরণ থাকে তবে এই বিতরণটি অবশ্যই "নির্ভরশীল" চালানের পিকআপের পরে সম্পাদন করতে হবে।
IN_SAME_VEHICLE_AT_DELIVERY_TIME আগের মতোই, "নির্ভরশীল" চালানের ব্যতীত তাদের সরবরাহের সময় তাদের গাড়ীতে একটি "প্রয়োজনীয়" চালান থাকা দরকার।

স্কিপশিপমেন্ট

একটি সমাধানে অপরিবর্তিত শিপমেন্টের বিশদ নির্দিষ্ট করে। তুচ্ছ মামলার জন্য এবং/অথবা যদি আমরা এড়িয়ে যাওয়ার কারণটি সনাক্ত করতে সক্ষম হই তবে আমরা এখানে কারণটি প্রতিবেদন করি।

ক্ষেত্র
index

int32

সূচকটি সোর্স ShipmentModel চালানের সূচকের সাথে মিলে যায়।

label

string

সংশ্লিষ্ট Shipment.label অনুলিপি.লাবেল, Shipment নির্দিষ্ট করা থাকলে।

reasons[]

Reason

কেন চালানটি এড়িয়ে গেছে তা ব্যাখ্যা করে এমন একটি কারণগুলির একটি তালিকা। উপরোক্ত Reason দেখুন। কেন আমরা কেন চালান এড়িয়ে গেছেন তা যদি বুঝতে না পারি তবে কারণগুলি সেট করা হবে না।

কারণ

চালানটি কেন এড়িয়ে গেছে তা যদি আমরা ব্যাখ্যা করতে পারি তবে কারণগুলি এখানে তালিকাভুক্ত করা হবে। যদি সমস্ত যানবাহনের জন্য কারণ একই না হয় তবে reason 1 টিরও বেশি উপাদান থাকবে। একটি এড়িয়ে যাওয়া চালানের নকল কারণ থাকতে পারে না, যেমন সমস্ত ক্ষেত্র একই থাকে example_vehicle_index । উদাহরণ:

reasons {
  code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
  example_vehicle_index: 1
  example_exceeded_capacity_type: "Apples"
}
reasons {
  code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
  example_vehicle_index: 3
  example_exceeded_capacity_type: "Pears"
}
reasons {
  code: CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT
  example_vehicle_index: 1
}

এড়িয়ে যাওয়া চালানটি সমস্ত যানবাহনের সাথে বেমানান। সমস্ত যানবাহনের জন্য কারণগুলি আলাদা হতে পারে তবে কমপক্ষে একটি গাড়ির "আপেল" ক্ষমতা ছাড়িয়ে যাবে (যানবাহন 1 সহ), কমপক্ষে একটি গাড়ির "নাশপাতি" ক্ষমতা ছাড়িয়ে যাবে (যানবাহন 3 সহ) এবং কমপক্ষে একটি গাড়ির দূরত্বের সীমা ছাড়িয়ে যাবে (যানবাহন 1 সহ)।

ক্ষেত্র
code

Code

কোডের মন্তব্যগুলি দেখুন।

example_ exceeded_ capacity_ type

string

যদি কারণ কোডটি DEMAND_EXCEEDS_VEHICLE_CAPACITY থাকে তবে একটি ক্ষমতার ধরণের নথি যা ছাড়িয়ে যায়।

example_ vehicle_ index

int32

যদি কারণটি চালান-যানবাহন অসঙ্গতির সাথে সম্পর্কিত হয় তবে এই ক্ষেত্রটি একটি প্রাসঙ্গিক গাড়ির সূচক সরবরাহ করে।

কোড

কোড কারণ টাইপ সনাক্তকরণ। এখানে অর্ডার অর্থহীন। বিশেষত, এটি উভয়ই প্রয়োগ করা হলে সমাধানের ক্ষেত্রে অন্য কোনও কারণ উপস্থিত হবে কিনা তার কোনও ইঙ্গিত দেয় না।

Enums
CODE_UNSPECIFIED এটি কখনই ব্যবহার করা উচিত নয়।
NO_VEHICLE মডেলটিতে কোনও যানবাহন নেই যা সমস্ত চালানকে অপ্রয়োজনীয় করে তোলে।
DEMAND_EXCEEDS_VEHICLE_CAPACITY চালানের চাহিদা কিছু ক্ষমতার ধরণের জন্য একটি গাড়ির সক্ষমতা ছাড়িয়ে যায়, যার মধ্যে একটি example_exceeded_capacity_type টাইপ।
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT

এই চালানটি সম্পাদনের জন্য প্রয়োজনীয় সর্বনিম্ন দূরত্ব, অর্থাত্ গাড়ির start_location থেকে চালানের পিকআপ এবং/অথবা ডেলিভারির অবস্থানগুলিতে এবং গাড়ির শেষ স্থানে গাড়ির route_distance_limit ছাড়িয়ে যায়।

নোট করুন যে এই গণনার জন্য আমরা জিওডেসিক দূরত্ব ব্যবহার করি।

CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT

ভ্রমণের সময়, অপেক্ষা করার সময় এবং পরিষেবার সময় সহ এই চালানটি সম্পাদনের জন্য প্রয়োজনীয় সর্বনিম্ন সময় গাড়ির route_duration_limit ছাড়িয়ে যায়।

দ্রষ্টব্য: ভ্রমণের সময়টি সেরা ক্ষেত্রে দৃশ্যে গণনা করা হয়, যথা জিওডেসিক দূরত্ব x 36 মি/এস (প্রায় 130 কিমি/ঘন্টা) হিসাবে।

CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT উপরের মতো একই তবে আমরা কেবল ন্যূনতম ভ্রমণের সময় এবং গাড়ির travel_duration_limit তুলনা করি।
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS যানবাহনটি এই চালানটি সেরা-ক্ষেত্রে দৃশ্যে সম্পাদন করতে পারে না (দেখুন CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT সময় গণনার জন্য) যদি এটি তার প্রথম দিকের সময়ে শুরু হয়: মোট সময়টি তার সর্বশেষ শেষ সময়ের পরে গাড়িটি শেষ করে দেবে।
VEHICLE_NOT_ALLOWED চালানের allowed_vehicle_indices ক্ষেত্রগুলি খালি নয় এবং এই যানটি এর সাথে সম্পর্কিত নয়।

টাইম উইন্ডো

টাইম উইন্ডোজ কোনও ইভেন্টের সময়কে সীমাবদ্ধ করে, যেমন দেখার সময় আগমনের সময়, বা কোনও গাড়ির শুরু এবং শেষ সময়।

হার্ড টাইম উইন্ডো সীমানা, start_time এবং end_time , ইভেন্টের প্রাথমিকতম এবং সর্বশেষ সময়টি প্রয়োগ করে, যেমন যে start_time <= event_time <= end_time । সফট টাইম উইন্ডো লোয়ার বাউন্ড, soft_start_time , soft_start_time বা তার পরে ঘটনার জন্য একটি পছন্দ প্রকাশ করে যা সফট_স্টার্ট_টাইম ইভেন্টটি হওয়ার আগে কতক্ষণ আগে আনুপাতিক ব্যয় করে। সফট টাইম উইন্ডো উপরের আবদ্ধ, soft_end_time , soft_end_time আগে বা তার আগে ঘটনার জন্য একটি অগ্রাধিকার প্রকাশ করে যা soft_end_time ইভেন্টটি ঘটে তার কতক্ষণের পরে সমানুপাতিক ব্যয় করে। start_time , end_time , soft_start_time এবং soft_end_time বিশ্বব্যাপী সময়সীমার মধ্যে হওয়া উচিত ( ShipmentModel.global_start_time এবং ShipmentModel.global_end_time দেখুন) এবং সম্মান করা উচিত:

  0 <= `start_time` <= `end_time` and
  0 <= `start_time` <= `soft_start_time` and
  0 <= `soft_end_time` <= `end_time`.
ক্ষেত্র
start_ time

Timestamp

হার্ড টাইম উইন্ডো শুরু করার সময়। যদি অনির্ধারিত হয় তবে এটি ShipmentModel.global_start_time সেট করা হবে।

end_ time

Timestamp

হার্ড টাইম উইন্ডো শেষ সময়। যদি অনির্ধারিত হয় তবে এটি ShipmentModel.global_end_time সেট করা হবে।

soft_ start_ time

Timestamp

সময় উইন্ডোর নরম শুরুর সময়।

soft_ end_ time

Timestamp

সময় উইন্ডোর নরম শেষ সময়।

cost_ per_ hour_ before_ soft_ start_ time

double

মডেলটিতে অন্যান্য ব্যয়গুলিতে প্রতি ঘন্টা ব্যয় যুক্ত করা হয় যদি ইভেন্টটি সফট_স্টার্ট_টাইমের আগে ঘটে থাকে তবে গণনা করা হয়:

   max(0, soft_start_time - t.seconds)
                          * cost_per_hour_before_soft_start_time / 3600,
t being the time of the event.

এই ব্যয়টি অবশ্যই ইতিবাচক হতে হবে এবং সফট_স্টার্ট_টাইম সেট করা থাকলে ক্ষেত্রটি কেবল সেট করা যেতে পারে।

cost_ per_ hour_ after_ soft_ end_ time

double

মডেলটিতে অন্যান্য ব্যয়গুলিতে প্রতি ঘন্টা ব্যয় যুক্ত করা হয় যদি ইভেন্টটি soft_end_time পরে ঘটে থাকে, হিসাবে গণনা করা হয়:

   max(0, t.seconds - soft_end_time.seconds)
                    * cost_per_hour_after_soft_end_time / 3600,
t being the time of the event.

এই ব্যয়টি অবশ্যই ইতিবাচক হতে হবে এবং ক্ষেত্রটি কেবল তখনই সেট করা যেতে পারে যদি soft_end_time সেট করা থাকে।

ট্রানজিশনঅ্যাট্রিবিউটস

কোনও রুটে টানা দুটি পরিদর্শনগুলির মধ্যে ট্রানজিশনের বৈশিষ্ট্যগুলি নির্দিষ্ট করে। বেশ কয়েকটি TransitionAttributes একই রূপান্তরটিতে প্রযোজ্য হতে পারে: সেক্ষেত্রে সমস্ত অতিরিক্ত ব্যয় যুক্ত হয় এবং কঠোর সীমাবদ্ধতা বা সীমাবদ্ধতা প্রযোজ্য (প্রাকৃতিক "এবং" শব্দার্থবিজ্ঞান অনুসরণ করে) প্রযোজ্য।

ক্ষেত্র
src_ tag

string

এই বৈশিষ্ট্যগুলি প্রযোজ্য (src-> ডিএসটি) ট্রানজিশনের সেট সংজ্ঞায়িত ট্যাগগুলি।

একটি উত্স ভিজিট বা যানবাহন শুরু হয় যদি তার VisitRequest.tags বা Vehicle.start_tags হয় src_tag থাকে বা excluded_src_tag থাকে না (এই দুটি ক্ষেত্রের মধ্যে কোনটি খালি খালি রয়েছে তার উপর নির্ভর করে)।

excluded_ src_ tag

string

src_tag দেখুন। ঠিক একটি src_tag এবং excluded_src_tag মধ্যে একটি অবশ্যই খালি হতে হবে।

dst_ tag

string

একটি গন্তব্য পরিদর্শন বা যানবাহন শেষের সাথে মেলে যদি এটি VisitRequest.tags বা Vehicle.end_tags হয় dst_tag থাকে বা excluded_dst_tag থাকে না (এই দুটি ক্ষেত্রের মধ্যে কোনটি খালি খালি রয়েছে তার উপর নির্ভর করে)।

excluded_ dst_ tag

string

dst_tag দেখুন। ঠিক dst_tag এর একটি এবং excluded_dst_tag অবশ্যই খালি খালি হতে হবে।

cost

double

এই রূপান্তর সম্পাদনের জন্য একটি ব্যয় নির্দিষ্ট করে। এটি মডেলের অন্যান্য সমস্ত ব্যয়ের মতো একই ইউনিটে রয়েছে এবং এটি নেতিবাচক হতে হবে না। এটি অন্যান্য সমস্ত বিদ্যমান ব্যয়ের শীর্ষে প্রয়োগ করা হয়।

cost_ per_ kilometer

double

এই রূপান্তরটি সম্পাদন করার সময় ভ্রমণ করা দূরত্বে প্রয়োগ করা প্রতি কিলোমিটারের জন্য একটি ব্যয় নির্দিষ্ট করে। এটি যে কোনও যানবাহনে যুক্ত করে Vehicle.cost_per_kilometer

distance_ limit

DistanceLimit

এই রূপান্তরটি সম্পাদন করার সময় ভ্রমণ করা দূরত্বের একটি সীমা নির্দিষ্ট করে।

2021/06 হিসাবে, কেবল নরম সীমা সমর্থিত।

delay

Duration

এই রূপান্তরটি সম্পাদন করার সময় ব্যয় করা একটি বিলম্ব নির্দিষ্ট করে।

এই বিলম্বটি সর্বদা উত্স ভিজিট শেষ করার পরে এবং গন্তব্য দর্শন শুরু করার আগে ঘটে।

যানবাহন

চালানের সমস্যায় একটি যানবাহন মডেল। একটি চালানের সমস্যা সমাধান করা এই যানবাহনের জন্য start_location থেকে শুরু করে একটি end_location তৈরি করবে। একটি রুট ভিজিটের ক্রম ( ShipmentRoute দেখুন)।

ক্ষেত্র
display_ name

string

গাড়ির ব্যবহারকারী-সংজ্ঞায়িত ডিসপ্লে নাম। এটি 63 টি অক্ষর দীর্ঘ হতে পারে এবং ইউটিএফ -8 অক্ষর ব্যবহার করতে পারে।

travel_ mode

TravelMode

ভ্রমণ মোড যা যানবাহন এবং এর গতি দ্বারা ব্যবহারযোগ্য রাস্তাগুলিকে প্রভাবিত করে। travel_duration_multiple দেখুন।

route_ modifiers

RouteModifiers

সন্তুষ্ট করার জন্য শর্তগুলির একটি সেট যা প্রদত্ত যানবাহনের জন্য রুটগুলি গণনা করা হয় তা প্রভাবিত করে।

start_ location

LatLng

ভৌগলিক অবস্থান যেখানে কোনও চালান বাছাইয়ের আগে যানবাহন শুরু হয়। যদি নির্দিষ্ট না করা হয় তবে গাড়িটি তার প্রথম পিকআপে শুরু হয়। যদি চালানের মডেলটির সময়কাল এবং দূরত্বের ম্যাট্রিক থাকে তবে start_location অবশ্যই নির্দিষ্ট করা উচিত নয়।

start_ waypoint

Waypoint

কোনও ভৌগলিক অবস্থানের প্রতিনিধিত্ব করে যেখানে কোনও চালান বাছাইয়ের আগে যানবাহন শুরু হয় এমন একটি ভৌগলিক অবস্থানের প্রতিনিধিত্ব করে। যদি start_waypoint বা start_location নির্দিষ্ট না করা হয় তবে গাড়িটি তার প্রথম পিকআপ থেকে শুরু হয়। যদি চালানের মডেলটির সময়কাল এবং দূরত্বের ম্যাট্রিক থাকে তবে start_waypoint নির্দিষ্ট করা উচিত নয়।

end_ location

LatLng

ভৌগলিক অবস্থান যেখানে যানটি শেষের পরে শেষ হওয়ার পরে VisitRequest হয়। যদি নির্দিষ্ট না করা হয় তবে গাড়ির ShipmentRoute শেষ যখন এটি তার শেষ VisitRequest সম্পূর্ণ করে তখন অবিলম্বে শেষ হয়। যদি চালানের মডেলটির সময়কাল এবং দূরত্বের ম্যাট্রিক থাকে তবে end_location অবশ্যই নির্দিষ্ট করা উচিত নয়।

end_ waypoint

Waypoint

ওয়ে পয়েন্টটি এমন একটি ভৌগলিক অবস্থানের প্রতিনিধিত্ব করে যেখানে গাড়িটি তার শেষ VisitRequest শেষ করার পরে শেষ হয়। যদি end_waypoint বা end_location নির্দিষ্ট না করা হয় তবে গাড়ির ShipmentRoute তার শেষ VisitRequest সম্পূর্ণ করার সাথে সাথেই শেষ হয়। যদি চালানের মডেলটির সময়কাল এবং দূরত্বের ম্যাট্রিক থাকে তবে end_waypoint নির্দিষ্ট করা উচিত নয়।

start_ tags[]

string

গাড়ির রুটের শুরুতে সংযুক্ত ট্যাগগুলি নির্দিষ্ট করে।

খালি বা সদৃশ স্ট্রিং অনুমোদিত নয়।

end_ tags[]

string

গাড়ির রুটের শেষের সাথে সংযুক্ত ট্যাগগুলি নির্দিষ্ট করে।

খালি বা সদৃশ স্ট্রিং অনুমোদিত নয়।

start_ time_ windows[]

TimeWindow

সময় উইন্ডোজ যার সময় যানবাহনটি তার শুরু করার অবস্থানটি ছেড়ে যেতে পারে। They must be within the global time limits (see ShipmentModel.global_* fields). If unspecified, there is no limitation besides those global time limits.

Time windows belonging to the same repeated field must be disjoint, ie no time window can overlap with or be adjacent to another, and they must be in chronological order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

end_ time_ windows[]

TimeWindow

Time windows during which the vehicle may arrive at its end location. They must be within the global time limits (see ShipmentModel.global_* fields). If unspecified, there is no limitation besides those global time limits.

Time windows belonging to the same repeated field must be disjoint, ie no time window can overlap with or be adjacent to another, and they must be in chronological order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

unloading_ policy

UnloadingPolicy

Unloading policy enforced on the vehicle.

load_ limits

map<string, LoadLimit >

Capacities of the vehicle (weight, volume, # of pallets for example). The keys in the map are the identifiers of the type of load, consistent with the keys of the Shipment.load_demands field. If a given key is absent from this map, the corresponding capacity is considered to be limitless.

cost_ per_ hour

double

Vehicle costs: all costs add up and must be in the same unit as Shipment.penalty_cost .

Cost per hour of the vehicle route. This cost is applied to the total time taken by the route, and includes travel time, waiting time, and visit time. Using cost_per_hour instead of just cost_per_traveled_hour may result in additional latency.

cost_ per_ traveled_ hour

double

Cost per traveled hour of the vehicle route. This cost is applied only to travel time taken by the route (ie, that reported in ShipmentRoute.transitions ), and excludes waiting time and visit time.

cost_ per_ kilometer

double

Cost per kilometer of the vehicle route. This cost is applied to the distance reported in the ShipmentRoute.transitions and does not apply to any distance implicitly traveled from the arrival_location to the departure_location of a single VisitRequest .

fixed_ cost

double

Fixed cost applied if this vehicle is used to handle a shipment.

used_ if_ route_ is_ empty

bool

This field only applies to vehicles when their route does not serve any shipments. It indicates if the vehicle should be considered as used or not in this case.

If true, the vehicle goes from its start to its end location even if it doesn't serve any shipments, and time and distance costs resulting from its start --> end travel are taken into account.

Otherwise, it doesn't travel from its start to its end location, and no break_rule or delay (from TransitionAttributes ) are scheduled for this vehicle. In this case, the vehicle's ShipmentRoute doesn't contain any information except for the vehicle index and label.

route_ duration_ limit

DurationLimit

Limit applied to the total duration of the vehicle's route. In a given OptimizeToursResponse , the route duration of a vehicle is the difference between its vehicle_end_time and vehicle_start_time .

travel_ duration_ limit

DurationLimit

Limit applied to the travel duration of the vehicle's route. In a given OptimizeToursResponse , the route travel duration is the sum of all its transitions.travel_duration .

route_ distance_ limit

DistanceLimit

Limit applied to the total distance of the vehicle's route. In a given OptimizeToursResponse , the route distance is the sum of all its transitions.travel_distance_meters .

extra_ visit_ duration_ for_ visit_ type

map<string, Duration >

Specifies a map from visit_types strings to durations. The duration is time in addition to VisitRequest.duration to be taken at visits with the specified visit_types . This extra visit duration adds cost if cost_per_hour is specified. Keys (ie visit_types ) cannot be empty strings.

If a visit request has multiple types, a duration will be added for each type in the map.

break_ rule

BreakRule

Describes the break schedule to be enforced on this vehicle. If empty, no breaks will be scheduled for this vehicle.

label

string

Specifies a label for this vehicle. This label is reported in the response as the vehicle_label of the corresponding ShipmentRoute .

ignore

bool

If true, used_if_route_is_empty must be false, and this vehicle will remain unused.

If a shipment is performed by an ignored vehicle in injected_first_solution_routes , it is skipped in the first solution but is free to be performed in the response.

If a shipment is performed by an ignored vehicle in injected_solution_constraint and any related pickup/delivery is constrained to remain on the vehicle (ie, not relaxed to level RELAX_ALL_AFTER_THRESHOLD ), it is skipped in the response. If a shipment has a non-empty allowed_vehicle_indices field and all of the allowed vehicles are ignored, it is skipped in the response.

travel_ duration_ multiple

double

Specifies a multiplicative factor that can be used to increase or decrease travel times of this vehicle. For example, setting this to 2.0 means that this vehicle is slower and has travel times that are twice what they are for standard vehicles. This multiple does not affect visit durations. It does affect cost if cost_per_hour or cost_per_traveled_hour are specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle is standard, and this multiple is considered 1.0.

WARNING: Travel times will be rounded to the nearest second after this multiple is applied but before performing any numerical operations, thus, a small multiple may result in a loss of precision.

See also extra_visit_duration_for_visit_type below.

DurationLimit

A limit defining a maximum duration of the route of a vehicle. It can be either hard or soft.

When a soft limit field is defined, both the soft max threshold and its associated cost must be defined together.

ক্ষেত্র
max_ duration

Duration

A hard limit constraining the duration to be at most max_duration.

soft_ max_ duration

Duration

A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost. This cost adds up to other costs defined in the model, with the same unit.

If defined, soft_max_duration must be nonnegative. If max_duration is also defined, soft_max_duration must be less than max_duration.

quadratic_ soft_ max_ duration

Duration

A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost, quadratic in the duration. This cost adds up to other costs defined in the model, with the same unit.

If defined, quadratic_soft_max_duration must be nonnegative. If max_duration is also defined, quadratic_soft_max_duration must be less than max_duration , and the difference must be no larger than one day:

max_duration - quadratic_soft_max_duration <= 86400 seconds

cost_ per_ hour_ after_ soft_ max

double

Cost per hour incurred if the soft_max_duration threshold is violated. The additional cost is 0 if the duration is under the threshold, otherwise the cost depends on the duration as follows:

  cost_per_hour_after_soft_max * (duration - soft_max_duration)

The cost must be nonnegative.

cost_ per_ square_ hour_ after_ quadratic_ soft_ max

double

Cost per square hour incurred if the quadratic_soft_max_duration threshold is violated.

The additional cost is 0 if the duration is under the threshold, otherwise the cost depends on the duration as follows:

  cost_per_square_hour_after_quadratic_soft_max *
  (duration - quadratic_soft_max_duration)^2

The cost must be nonnegative.

LoadLimit

Defines a load limit applying to a vehicle, eg "this truck may only carry up to 3500 kg". See load_limits .

ক্ষেত্র
soft_ max_ load

int64

A soft limit of the load. See cost_per_unit_above_soft_max .

cost_ per_ unit_ above_ soft_ max

double

If the load ever exceeds soft_max_load along this vehicle's route, the following cost penalty applies (only once per vehicle): (load - soft_max_load ) * cost_per_unit_above_soft_max . All costs add up and must be in the same unit as Shipment.penalty_cost .

start_ load_ interval

Interval

The acceptable load interval of the vehicle at the start of the route.

end_ load_ interval

Interval

The acceptable load interval of the vehicle at the end of the route.

max_ load

int64

The maximum acceptable amount of load.

ব্যবধান

Interval of acceptable load amounts.

ক্ষেত্র
min

int64

A minimum acceptable load. Must be ≥ 0. If they're both specified, min must be ≤ max .

max

int64

A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum load is unrestricted by this message. If they're both specified, min must be ≤ max .

TravelMode

Travel modes which can be used by vehicles.

These should be a subset of the Google Maps Platform Routes API travel modes, see: https://developers.google.com/maps/documentation/routes/reference/rest/v2/RouteTravelMode

Note: WALKING routes are in beta and might sometimes be missing clear sidewalks or pedestrian paths. You must display this warning to the user for all walking routes that you display in your app.

Enums
TRAVEL_MODE_UNSPECIFIED Unspecified travel mode, equivalent to DRIVING .
DRIVING Travel mode corresponding to driving directions (car, ...).
WALKING Travel mode corresponding to walking directions.

UnloadingPolicy

Policy on how a vehicle can be unloaded. Applies only to shipments having both a pickup and a delivery.

Other shipments are free to occur anywhere on the route independent of unloading_policy .

Enums
UNLOADING_POLICY_UNSPECIFIED Unspecified unloading policy; deliveries must just occur after their corresponding pickups.
LAST_IN_FIRST_OUT Deliveries must occur in reverse order of pickups
FIRST_IN_FIRST_OUT Deliveries must occur in the same order as pickups

ওয়েপয়েন্ট

Encapsulates a waypoint. Waypoints mark arrival and departure locations of VisitRequests, and start and end locations of Vehicles.

ক্ষেত্র
side_ of_ road

bool

ঐচ্ছিক। Indicates that the location of this waypoint is meant to have a preference for the vehicle to stop at a particular side of road. When you set this value, the route will pass through the location so that the vehicle can stop at the side of road that the location is biased towards from the center of the road. This option doesn't work for the 'WALKING' travel mode.

Union field location_type . Different ways to represent a location. location_type can be only one of the following:
location

Location

A point specified using geographic coordinates, including an optional heading.

place_ id

string

The POI place ID associated with the waypoint.

When using a place ID to specify arrival or departure location of a VisitRequest, use a place ID that is specific enough to determine a LatLng location for navigation to the place. For example, a place ID representing a building is suitable, but a place ID representing a road is discouraged.

,

সূচক

RouteOptimization

A service for optimizing vehicle tours.

Validity of certain types of fields:

  • google.protobuf.Timestamp
    • Times are in Unix time: seconds since 1970-01-01T00:00:00+00:00.
    • seconds must be in [0, 253402300799], ie in [1970-01-01T00:00:00+00:00, 9999-12-31T23:59:59+00:00].
    • nanos must be unset or set to 0.
  • google.protobuf.Duration
    • seconds must be in [0, 253402300799], ie in [1970-01-01T00:00:00+00:00, 9999-12-31T23:59:59+00:00].
    • nanos must be unset or set to 0.
  • google.type.LatLng
    • latitude must be in [-90.0, 90.0].
    • longitude must be in [-180.0, 180.0].
    • at least one of latitude and longitude must be non-zero.
BatchOptimizeTours

rpc BatchOptimizeTours( BatchOptimizeToursRequest ) returns ( Operation )

Optimizes vehicle tours for one or more OptimizeToursRequest messages as a batch.

This method is a Long Running Operation (LRO). The inputs for optimization ( OptimizeToursRequest messages) and outputs ( OptimizeToursResponse messages) are read from and written to Cloud Storage in user-specified format. Like the OptimizeTours method, each OptimizeToursRequest contains a ShipmentModel and returns an OptimizeToursResponse containing ShipmentRoute fields, which are a set of routes to be performed by vehicles minimizing the overall cost.

The user can poll operations.get to check the status of the LRO:

If the LRO done field is false, then at least one request is still being processed. Other requests may have completed successfully and their results are available in Cloud Storage.

If the LRO's done field is true, then all requests have been processed. Any successfully processed requests will have their results available in Cloud Storage. Any requests that failed will not have their results available in Cloud Storage. If the LRO's error field is set, then it contains the error from one of the failed requests.

অনুমোদনের সুযোগ

নিম্নলিখিত OAuth সুযোগ প্রয়োজন:

  • https://www.googleapis.com/auth/cloud-platform
আইএএম অনুমতি

Requires the following IAM permission on the parent resource:

  • routeoptimization.operations.create

For more information, see the IAM documentation .

OptimizeTours

rpc OptimizeTours( OptimizeToursRequest ) returns ( OptimizeToursResponse )

Sends an OptimizeToursRequest containing a ShipmentModel and returns an OptimizeToursResponse containing ShipmentRoute s, which are a set of routes to be performed by vehicles minimizing the overall cost.

A ShipmentModel model consists mainly of Shipment s that need to be carried out and Vehicle s that can be used to transport the Shipment s. The ShipmentRoute s assign Shipment s to Vehicle s. More specifically, they assign a series of Visit s to each vehicle, where a Visit corresponds to a VisitRequest , which is a pickup or delivery for a Shipment .

The goal is to provide an assignment of ShipmentRoute s to Vehicle s that minimizes the total cost where cost has many components defined in the ShipmentModel .

অনুমোদনের সুযোগ

নিম্নলিখিত OAuth সুযোগ প্রয়োজন:

  • https://www.googleapis.com/auth/cloud-platform
আইএএম অনুমতি

Requires the following IAM permission on the parent resource:

  • routeoptimization.locations.use

For more information, see the IAM documentation .

AggregatedMetrics

Aggregated metrics for ShipmentRoute (resp. for OptimizeToursResponse over all Transition and/or Visit (resp. over all ShipmentRoute ) elements.

ক্ষেত্র
performed_ shipment_ count

int32

Number of shipments performed. Note that a pickup and delivery pair only counts once.

travel_ duration

Duration

Total travel duration for a route or a solution.

wait_ duration

Duration

Total wait duration for a route or a solution.

delay_ duration

Duration

Total delay duration for a route or a solution.

break_ duration

Duration

Total break duration for a route or a solution.

visit_ duration

Duration

Total visit duration for a route or a solution.

total_ duration

Duration

The total duration should be equal to the sum of all durations above. For routes, it also corresponds to:

[ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] - [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]
travel_ distance_ meters

double

Total travel distance for a route or a solution.

max_ loads

map<string, VehicleLoad >

Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all Transition.vehicle_loads (resp. ShipmentRoute.metrics.max_loads .

BatchOptimizeToursMetadata

This type has no fields.

Operation metadata for BatchOptimizeToursRequest calls.

BatchOptimizeToursRequest

Request to batch optimize tours as an asynchronous operation. Each input file should contain one OptimizeToursRequest , and each output file will contain one OptimizeToursResponse . The request contains information to read/write and parse the files. All the input and output files should be under the same project.

ক্ষেত্র
parent

string

প্রয়োজন। Target project and location to make a call.

Format: * projects/{project-id} * projects/{project-id}/locations/{location-id}

If no location is specified, a region will be chosen automatically.

model_ configs[]

AsyncModelConfig

প্রয়োজন। Input/Output information each purchase model, such as file paths and data formats.

AsyncModelConfig

Information for solving one optimization model asynchronously.

ক্ষেত্র
display_ name

string

ঐচ্ছিক। User defined model name, can be used as alias by users to keep track of models.

input_ config

InputConfig

প্রয়োজন। Information about the input model.

output_ config

OutputConfig

প্রয়োজন। The desired output location information.

BatchOptimizeToursResponse

This type has no fields.

Response to a BatchOptimizeToursRequest . This is returned in the Long Running Operation after the operation is complete.

BreakRule

Rules to generate time breaks for a vehicle (eg lunch breaks). A break is a contiguous period of time during which the vehicle remains idle at its current position and cannot perform any visit. A break may occur:

  • during the travel between two visits (which includes the time right before or right after a visit, but not in the middle of a visit), in which case it extends the corresponding transit time between the visits,
  • or before the vehicle start (the vehicle may not start in the middle of a break), in which case it does not affect the vehicle start time.
  • or after the vehicle end (ditto, with the vehicle end time).
ক্ষেত্র
break_ requests[]

BreakRequest

Sequence of breaks. See the BreakRequest message.

frequency_ constraints[]

FrequencyConstraint

Several FrequencyConstraint may apply. They must all be satisfied by the BreakRequest s of this BreakRule . See FrequencyConstraint .

BreakRequest

The sequence of breaks (ie their number and order) that apply to each vehicle must be known beforehand. The repeated BreakRequest s define that sequence, in the order in which they must occur. Their time windows ( earliest_start_time / latest_start_time ) may overlap, but they must be compatible with the order (this is checked).

ক্ষেত্র
earliest_ start_ time

Timestamp

প্রয়োজন। Lower bound (inclusive) on the start of the break.

latest_ start_ time

Timestamp

প্রয়োজন। Upper bound (inclusive) on the start of the break.

min_ duration

Duration

প্রয়োজন। Minimum duration of the break. ইতিবাচক হতে হবে।

FrequencyConstraint

One may further constrain the frequency and duration of the breaks specified above, by enforcing a minimum break frequency, such as "There must be a break of at least 1 hour every 12 hours". Assuming that this can be interpreted as "Within any sliding time window of 12h, there must be at least one break of at least one hour", that example would translate to the following FrequencyConstraint :

{
   min_break_duration { seconds: 3600 }         # 1 hour.
   max_inter_break_duration { seconds: 39600 }  # 11 hours (12 - 1 = 11).
}

The timing and duration of the breaks in the solution will respect all such constraints, in addition to the time windows and minimum durations already specified in the BreakRequest .

A FrequencyConstraint may in practice apply to non-consecutive breaks. For example, the following schedule honors the "1h every 12h" example:

  04:00 vehicle start
   .. performing travel and visits ..
  09:00 1 hour break
  10:00 end of the break
   .. performing travel and visits ..
  12:00 20-min lunch break
  12:20 end of the break
   .. performing travel and visits ..
  21:00 1 hour break
  22:00 end of the break
   .. performing travel and visits ..
  23:59 vehicle end
ক্ষেত্র
min_ break_ duration

Duration

প্রয়োজন। Minimum break duration for this constraint. Nonnegative. See description of FrequencyConstraint .

max_ inter_ break_ duration

Duration

প্রয়োজন। Maximum allowed span of any interval of time in the route that does not include at least partially a break of duration >= min_break_duration . ইতিবাচক হতে হবে।

ডেটা ফরম্যাট

Data formats for input and output files.

Enums
DATA_FORMAT_UNSPECIFIED Invalid value, format must not be UNSPECIFIED.
JSON জাভাস্ক্রিপ্ট অবজেক্ট নোটেশন।
PROTO_TEXT Protocol Buffers text format. See https://protobuf.dev/reference/protobuf/textformat-spec/

DistanceLimit

A limit defining a maximum distance which can be traveled. It can be either hard or soft.

If a soft limit is defined, both soft_max_meters and cost_per_kilometer_above_soft_max must be defined and be nonnegative.

ক্ষেত্র
max_ meters

int64

A hard limit constraining the distance to be at most max_meters. The limit must be nonnegative.

soft_ max_ meters

int64

A soft limit not enforcing a maximum distance limit, but when violated results in a cost which adds up to other costs defined in the model, with the same unit.

If defined soft_max_meters must be less than max_meters and must be nonnegative.

cost_ per_ kilometer_ below_ soft_ max

double

Cost per kilometer incurred, increasing up to soft_max_meters , with formula:

  min(distance_meters, soft_max_meters) / 1000.0 *
  cost_per_kilometer_below_soft_max.

This cost is not supported in route_distance_limit .

cost_ per_ kilometer_ above_ soft_ max

double

Cost per kilometer incurred if distance is above soft_max_meters limit. The additional cost is 0 if the distance is under the limit, otherwise the formula used to compute the cost is the following:

  (distance_meters - soft_max_meters) / 1000.0 *
  cost_per_kilometer_above_soft_max.

The cost must be nonnegative.

Gcs গন্তব্য

The Google Cloud Storage location where the output file(s) will be written to.

ক্ষেত্র
uri

string

প্রয়োজন। Google Cloud Storage URI.

GcsSource

The Google Cloud Storage location where the input file will be read from.

ক্ষেত্র
uri

string

প্রয়োজন। URI of a Google Cloud Storage object with the format gs://bucket/path/to/object .

InjectedSolutionConstraint

Solution injected in the request including information about which visits must be constrained and how they must be constrained.

ক্ষেত্র
routes[]

ShipmentRoute

Routes of the solution to inject. Some routes may be omitted from the original solution. The routes and skipped shipments must satisfy the basic validity assumptions listed for injected_first_solution_routes .

skipped_ shipments[]

SkippedShipment

Skipped shipments of the solution to inject. Some may be omitted from the original solution. See the routes field.

constraint_ relaxations[]

ConstraintRelaxation

For zero or more groups of vehicles, specifies when and how much to relax constraints. If this field is empty, all non-empty vehicle routes are fully constrained.

ConstraintRelaxation

For a group of vehicles, specifies at what threshold(s) constraints on visits will be relaxed and to which level. Shipments listed in the skipped_shipment field are constrained to be skipped; ie, they cannot be performed.

ক্ষেত্র
relaxations[]

Relaxation

All the visit constraint relaxations that will apply to visits on routes with vehicles in vehicle_indices .

vehicle_ indices[]

int32

Specifies the vehicle indices to which the visit constraint relaxations apply. If empty, this is considered the default and the relaxations apply to all vehicles that are not specified in other constraint_relaxations . There can be at most one default, ie, at most one constraint relaxation field is allowed empty vehicle_indices . A vehicle index can only be listed once, even within several constraint_relaxations .

A vehicle index is mapped the same as ShipmentRoute.vehicle_index , if interpret_injected_solutions_using_labels is true (see fields comment).

শিথিলতা

If relaxations is empty, the start time and sequence of all visits on routes are fully constrained and no new visits may be inserted or added to those routes. Also, a vehicle's start and end time in routes is fully constrained, unless the vehicle is empty (ie, has no visits and has used_if_route_is_empty set to false in the model).

relaxations(i).level specifies the constraint relaxation level applied to a visit #j that satisfies:

  • route.visits(j).start_time >= relaxations(i).threshold_time AND
  • j + 1 >= relaxations(i).threshold_visit_count

Similarly, the vehicle start is relaxed to relaxations(i).level if it satisfies:

  • vehicle_start_time >= relaxations(i).threshold_time AND
  • relaxations(i).threshold_visit_count == 0 and the vehicle end is relaxed to relaxations(i).level if it satisfies:
  • vehicle_end_time >= relaxations(i).threshold_time AND
  • route.visits_size() + 1 >= relaxations(i).threshold_visit_count

To apply a relaxation level if a visit meets the threshold_visit_count OR the threshold_time add two relaxations with the same level : one with only threshold_visit_count set and the other with only threshold_time set. If a visit satisfies the conditions of multiple relaxations , the most relaxed level applies. As a result, from the vehicle start through the route visits in order to the vehicle end, the relaxation level becomes more relaxed: ie, the relaxation level is non-decreasing as the route progresses.

The timing and sequence of route visits that do not satisfy the threshold conditions of any relaxations are fully constrained and no visits may be inserted into these sequences. Also, if a vehicle start or end does not satisfy the conditions of any relaxation the time is fixed, unless the vehicle is empty.

ক্ষেত্র
level

Level

The constraint relaxation level that applies when the conditions at or after threshold_time AND at least threshold_visit_count are satisfied.

threshold_ time

Timestamp

The time at or after which the relaxation level may be applied.

threshold_ visit_ count

int32

The number of visits at or after which the relaxation level may be applied. If threshold_visit_count is 0 (or unset), the level may be applied directly at the vehicle start.

If it is route.visits_size() + 1 , the level may only be applied to the vehicle end. If it is more than route.visits_size() + 1 , level is not applied at all for that route.

স্তর

Expresses the different constraint relaxation levels, which are applied for a visit and those that follow when it satisfies the threshold conditions.

The enumeration below is in order of increasing relaxation.

Enums
LEVEL_UNSPECIFIED

Implicit default relaxation level: no constraints are relaxed, ie, all visits are fully constrained.

This value must not be explicitly used in level .

RELAX_VISIT_TIMES_AFTER_THRESHOLD Visit start times and vehicle start/end times will be relaxed, but each visit remains bound to the same vehicle and the visit sequence must be observed: no visit can be inserted between them or before them.
RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD Same as RELAX_VISIT_TIMES_AFTER_THRESHOLD , but the visit sequence is also relaxed: visits can only be performed by this vehicle, but can potentially become unperformed.
RELAX_ALL_AFTER_THRESHOLD Same as RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD , but the vehicle is also relaxed: visits are completely free at or after the threshold time and can potentially become unperformed.

InputConfig

Specify an input for [BatchOptimizeTours][google.maps.routeoptimization.v1.RouteOptimizationService.BatchOptimizeTours].

ক্ষেত্র
data_ format

DataFormat

প্রয়োজন। The input data format.

Union field source . প্রয়োজন। source can be only one of the following:
gcs_ source

GcsSource

A Google Cloud Storage location. This must be a single object (file).

অবস্থান

Encapsulates a location (a geographic point, and an optional heading).

ক্ষেত্র
lat_ lng

LatLng

The waypoint's geographic coordinates.

heading

int32

The compass heading associated with the direction of the flow of traffic. This value is used to specify the side of the road to use for pickup and drop-off. Heading values can be from 0 to 360, where 0 specifies a heading of due North, 90 specifies a heading of due East, etc.

OptimizeToursRequest

Request to be given to a tour optimization solver which defines the shipment model to solve as well as optimization parameters.

ক্ষেত্র
parent

string

প্রয়োজন। Target project or location to make a call.

Format: * projects/{project-id} * projects/{project-id}/locations/{location-id}

If no location is specified, a region will be chosen automatically.

timeout

Duration

If this timeout is set, the server returns a response before the timeout period has elapsed or the server deadline for synchronous requests is reached, whichever is sooner.

For asynchronous requests, the server will generate a solution (if possible) before the timeout has elapsed.

model

ShipmentModel

Shipment model to solve.

solving_ mode

SolvingMode

By default, the solving mode is DEFAULT_SOLVE (0).

search_ mode

SearchMode

Search mode used to solve the request.

injected_ first_ solution_ routes[]

ShipmentRoute

Guide the optimization algorithm in finding a first solution that is similar to a previous solution.

The model is constrained when the first solution is built. Any shipments not performed on a route are implicitly skipped in the first solution, but they may be performed in successive solutions.

The solution must satisfy some basic validity assumptions:

  • for all routes, vehicle_index must be in range and not be duplicated.
  • for all visits, shipment_index and visit_request_index must be in range.
  • a shipment may only be referenced on one route.
  • the pickup of a pickup-delivery shipment must be performed before the delivery.
  • no more than one pickup alternative or delivery alternative of a shipment may be performed.
  • for all routes, times are increasing (ie, vehicle_start_time <= visits[0].start_time <= visits[1].start_time ... <= vehicle_end_time ).
  • a shipment may only be performed on a vehicle that is allowed. A vehicle is allowed if Shipment.allowed_vehicle_indices is empty or its vehicle_index is included in Shipment.allowed_vehicle_indices .

If the injected solution is not feasible, a validation error is not necessarily returned and an error indicating infeasibility may be returned instead.

injected_ solution_ constraint

InjectedSolutionConstraint

Constrain the optimization algorithm to find a final solution that is similar to a previous solution. For example, this may be used to freeze portions of routes which have already been completed or which are to be completed but must not be modified.

If the injected solution is not feasible, a validation error is not necessarily returned and an error indicating infeasibility may be returned instead.

refresh_ details_ routes[]

ShipmentRoute

If non-empty, the given routes will be refreshed, without modifying their underlying sequence of visits or travel times: only other details will be updated. This does not solve the model.

As of 2020/11, this only populates the polylines of non-empty routes and requires that populate_polylines is true.

The route_polyline fields of the passed-in routes may be inconsistent with route transitions .

This field must not be used together with injected_first_solution_routes or injected_solution_constraint .

Shipment.ignore and Vehicle.ignore have no effect on the behavior. Polylines are still populated between all visits in all non-empty routes regardless of whether the related shipments or vehicles are ignored.

interpret_ injected_ solutions_ using_ labels

bool

If true:

This interpretation applies to the injected_first_solution_routes , injected_solution_constraint , and refresh_details_routes fields. It can be used when shipment or vehicle indices in the request have changed since the solution was created, perhaps because shipments or vehicles have been removed from or added to the request.

If true, labels in the following categories must appear at most once in their category:

If a vehicle_label in the injected solution does not correspond to a request vehicle, the corresponding route is removed from the solution along with its visits. If a shipment_label in the injected solution does not correspond to a request shipment, the corresponding visit is removed from the solution. If a SkippedShipment.label in the injected solution does not correspond to a request shipment, the SkippedShipment is removed from the solution.

Removing route visits or entire routes from an injected solution may have an effect on the implied constraints, which may lead to change in solution, validation errors, or infeasibility.

NOTE: The caller must ensure that each Vehicle.label (resp. Shipment.label ) uniquely identifies a vehicle (resp. shipment) entity used across the two relevant requests: the past request that produced the OptimizeToursResponse used in the injected solution and the current request that includes the injected solution. The uniqueness checks described above are not enough to guarantee this requirement.

consider_ road_ traffic

bool

Consider traffic estimation in calculating ShipmentRoute fields Transition.travel_duration , Visit.start_time , and vehicle_end_time ; in setting the ShipmentRoute.has_traffic_infeasibilities field, and in calculating the OptimizeToursResponse.total_cost field.

populate_ polylines

bool

If true, polylines will be populated in response ShipmentRoute s.

populate_ transition_ polylines

bool

If true, polylines and route tokens will be populated in response ShipmentRoute.transitions .

allow_ large_ deadline_ despite_ interruption_ risk

bool

If this is set, then the request can have a deadline (see https://grpc.io/blog/deadlines ) of up to 60 minutes. Otherwise, the maximum deadline is only 30 minutes. Note that long-lived requests have a significantly larger (but still small) risk of interruption.

use_ geodesic_ distances

bool

If true, travel distances will be computed using geodesic distances instead of Google Maps distances, and travel times will be computed using geodesic distances with a speed defined by geodesic_meters_per_second .

label

string

Label that may be used to identify this request, reported back in the OptimizeToursResponse.request_label .

geodesic_ meters_ per_ second

double

When use_geodesic_distances is true, this field must be set and defines the speed applied to compute travel times. Its value must be at least 1.0 meters/seconds.

max_ validation_ errors

int32

Truncates the number of validation errors returned. These errors are typically attached to an INVALID_ARGUMENT error payload as a BadRequest error detail ( https://cloud.google.com/apis/design/errors#error_details) , unless solving_mode=VALIDATE_ONLY: see the OptimizeToursResponse.validation_errors field. This defaults to 100 and is capped at 10,000.

SearchMode

Mode defining the behavior of the search, trading off latency versus solution quality. In all modes, the global request deadline is enforced.

Enums
SEARCH_MODE_UNSPECIFIED Unspecified search mode, equivalent to RETURN_FAST .
RETURN_FAST Stop the search after finding the first good solution.
CONSUME_ALL_AVAILABLE_TIME Spend all the available time to search for better solutions.

SolvingMode

Defines how the solver should handle the request. In all modes but VALIDATE_ONLY , if the request is invalid, you will receive an INVALID_REQUEST error. See max_validation_errors to cap the number of errors returned.

Enums
DEFAULT_SOLVE Solve the model. Warnings may be issued in [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors].
VALIDATE_ONLY Only validates the model without solving it: populates as many OptimizeToursResponse.validation_errors as possible.
DETECT_SOME_INFEASIBLE_SHIPMENTS

Only populates OptimizeToursResponse.validation_errors or OptimizeToursResponse.skipped_shipments , and doesn't actually solve the rest of the request ( status and routes are unset in the response). If infeasibilities in injected_solution_constraint routes are detected they are populated in the OptimizeToursResponse.validation_errors field and OptimizeToursResponse.skipped_shipments is left empty.

IMPORTANT : not all infeasible shipments are returned here, but only the ones that are detected as infeasible during preprocessing.

OptimizeToursResponse

Response after solving a tour optimization problem containing the routes followed by each vehicle, the shipments which have been skipped and the overall cost of the solution.

ক্ষেত্র
routes[]

ShipmentRoute

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

request_ label

string

Copy of the OptimizeToursRequest.label , if a label was specified in the request.

skipped_ shipments[]

SkippedShipment

The list of all shipments skipped.

validation_ errors[]

OptimizeToursValidationError

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message. Instead of errors, this will include warnings in the case solving_mode is DEFAULT_SOLVE .

metrics

Metrics

Duration, distance and usage metrics for this solution.

মেট্রিক্স

Overall metrics, aggregated over all routes.

ক্ষেত্র
aggregated_ route_ metrics

AggregatedMetrics

Aggregated over the routes. Each metric is the sum (or max, for loads) over all ShipmentRoute.metrics fields of the same name.

skipped_ mandatory_ shipment_ count

int32

Number of mandatory shipments skipped.

used_ vehicle_ count

int32

Number of vehicles used. Note: if a vehicle route is empty and Vehicle.used_if_route_is_empty is true, the vehicle is considered used.

earliest_ vehicle_ start_ time

Timestamp

The earliest start time for a used vehicle, computed as the minimum over all used vehicles of ShipmentRoute.vehicle_start_time .

latest_ vehicle_ end_ time

Timestamp

The latest end time for a used vehicle, computed as the maximum over all used vehicles of ShipmentRoute.vehicle_end_time .

costs

map<string, double>

Cost of the solution, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, eg "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

total_ cost

double

Total cost of the solution. The sum of all values in the costs map.

OptimizeToursValidationError

Describes an error or warning encountered when validating an OptimizeToursRequest .

ক্ষেত্র
code

int32

A validation error is defined by the pair ( code , display_name ) which are always present.

The fields following this section provide more context about the error.

MULTIPLE ERRORS : When there are multiple errors, the validation process tries to output several of them. Much like a compiler, this is an imperfect process. Some validation errors will be "fatal", meaning that they stop the entire validation process. This is the case for display_name="UNSPECIFIED" errors, among others. Some errors may cause the validation process to skip other errors.

STABILITY : code and display_name should be very stable. But new codes and display names may appear over time, which may cause a given (invalid) request to yield a different ( code , display_name ) pair because the new error hid the old one. For example, see "MULTIPLE ERRORS".

display_ name

string

The error display name.

fields[]

FieldReference

An error context may involve 0, 1 (most of the time) or more fields. For example, referring to vehicle #4 and shipment #2's first pickup can be done as follows:

fields { name: "vehicles" index: 4}
fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }

Note, however, that the cardinality of fields should not change for a given error code.

error_ message

string

Human-readable string describing the error. There is a 1:1 mapping between code and error_message (when code != "UNSPECIFIED").

STABILITY : Not stable: the error message associated to a given code may change (hopefully to clarify it) over time. Please rely on the display_name and code instead.

offending_ values

string

May contain the value(s) of the field(s). This is not always available. You should absolutely not rely on it and use it only for manual model debugging.

FieldReference

Specifies a context for the validation error. A FieldReference always refers to a given field in this file and follows the same hierarchical structure. For example, we may specify element #2 of start_time_windows of vehicle #5 using:

name: "vehicles" index: 5 sub_field { name: "end_time_windows" index: 2 }

We however omit top-level entities such as OptimizeToursRequest or ShipmentModel to avoid crowding the message.

ক্ষেত্র
name

string

Name of the field, eg, "vehicles".

sub_ field

FieldReference

Recursively nested sub-field, if needed.

Union field index_or_key .

index_or_key can be only one of the following:

index

int32

Index of the field if repeated.

key

string

Key if the field is a map.

আউটপুট কনফিগারেশন

Specify a destination for [BatchOptimizeTours][google.maps.routeoptimization.v1.RouteOptimizationService.BatchOptimizeTours] results.

ক্ষেত্র
data_ format

DataFormat

প্রয়োজন। The output data format.

Union field destination . প্রয়োজন। destination can be only one of the following:
gcs_ destination

GcsDestination

The Google Cloud Storage location to write the output to.

RouteModifiers

Encapsulates a set of optional conditions to satisfy when calculating vehicle routes. This is similar to RouteModifiers in the Google Maps Platform Routes Preferred API; see: https://developers.google.com/maps/documentation/routes/reference/rest/v2/RouteModifiers .

ক্ষেত্র
avoid_ tolls

bool

Specifies whether to avoid toll roads where reasonable. Preference will be given to routes not containing toll roads. Applies only to motorized travel modes.

avoid_ highways

bool

Specifies whether to avoid highways where reasonable. Preference will be given to routes not containing highways. Applies only to motorized travel modes.

avoid_ ferries

bool

Specifies whether to avoid ferries where reasonable. Preference will be given to routes not containing travel by ferries. Applies only to motorized travel modes.

avoid_ indoor

bool

ঐচ্ছিক। Specifies whether to avoid navigating indoors where reasonable. Preference will be given to routes not containing indoor navigation. Applies only to the WALKING travel mode.

চালান

The shipment of a single item, from one of its pickups to one of its deliveries. For the shipment to be considered as performed, a unique vehicle must visit one of its pickup locations (and decrease its spare capacities accordingly), then visit one of its delivery locations later on (and therefore re-increase its spare capacities accordingly).

ক্ষেত্র
display_ name

string

The user-defined display name of the shipment. It can be up to 63 characters long and may use UTF-8 characters.

pickups[]

VisitRequest

Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.

deliveries[]

VisitRequest

Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.

load_ demands

map<string, Load >

Load demands of the shipment (for example weight, volume, number of pallets etc). The keys in the map should be identifiers describing the type of the corresponding load, ideally also including the units. For example: "weight_kg", "volume_gallons", "pallet_count", etc. If a given key does not appear in the map, the corresponding load is considered as null.

allowed_ vehicle_ indices[]

int32

The set of vehicles that may perform this shipment. If empty, all vehicles may perform it. Vehicles are given by their index in the ShipmentModel 's vehicles list.

costs_ per_ vehicle[]

double

Specifies the cost that is incurred when this shipment is delivered by each vehicle. If specified, it must have EITHER:

  • the same number of elements as costs_per_vehicle_indices . costs_per_vehicle[i] corresponds to vehicle costs_per_vehicle_indices[i] of the model.
  • the same number of elements as there are vehicles in the model. The i-th element corresponds to vehicle #i of the model.

These costs must be in the same unit as penalty_cost and must not be negative. Leave this field empty, if there are no such costs.

costs_ per_ vehicle_ indices[]

int32

Indices of the vehicles to which costs_per_vehicle applies. If non-empty, it must have the same number of elements as costs_per_vehicle . A vehicle index may not be specified more than once. If a vehicle is excluded from costs_per_vehicle_indices , its cost is zero.

pickup_ to_ delivery_ absolute_ detour_ limit

Duration

Specifies the maximum absolute detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery.

For example, let t be the shortest time taken to go from the selected pickup alternative directly to the selected delivery alternative. Then setting pickup_to_delivery_absolute_detour_limit enforces:

start_time(delivery) - start_time(pickup) <=
t + pickup_to_delivery_absolute_detour_limit

If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles.

pickup_ to_ delivery_ time_ limit

Duration

Specifies the maximum duration from start of pickup to start of delivery of a shipment. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery. This does not depend on which alternatives are selected for pickup and delivery, nor on vehicle speed. This can be specified alongside maximum detour constraints: the solution will respect both specifications.

shipment_ type

string

Non-empty string specifying a "type" for this shipment. This feature can be used to define incompatibilities or requirements between shipment_types (see shipment_type_incompatibilities and shipment_type_requirements in ShipmentModel ).

Differs from visit_types which is specified for a single visit: All pickup/deliveries belonging to the same shipment share the same shipment_type .

label

string

Specifies a label for this shipment. This label is reported in the response in the shipment_label of the corresponding ShipmentRoute.Visit .

ignore

bool

If true, skip this shipment, but don't apply a penalty_cost .

Ignoring a shipment results in a validation error when there are any shipment_type_requirements in the model.

Ignoring a shipment that is performed in injected_first_solution_routes or injected_solution_constraint is permitted; the solver removes the related pickup/delivery visits from the performing route. precedence_rules that reference ignored shipments will also be ignored.

penalty_ cost

double

If the shipment is not completed, this penalty is added to the overall cost of the routes. A shipment is considered completed if one of its pickup and delivery alternatives is visited. The cost may be expressed in the same unit used for all other cost-related fields in the model and must be positive.

IMPORTANT : If this penalty is not specified, it is considered infinite, ie the shipment must be completed.

pickup_ to_ delivery_ relative_ detour_ limit

double

Specifies the maximum relative detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery.

For example, let t be the shortest time taken to go from the selected pickup alternative directly to the selected delivery alternative. Then setting pickup_to_delivery_relative_detour_limit enforces:

start_time(delivery) - start_time(pickup) <=
std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit))

If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles.

লোড

When performing a visit, a predefined amount may be added to the vehicle load if it's a pickup, or subtracted if it's a delivery. This message defines such amount. See load_demands .

ক্ষেত্র
amount

int64

The amount by which the load of the vehicle performing the corresponding visit will vary. Since it is an integer, users are advised to choose an appropriate unit to avoid loss of precision. Must be ≥ 0.

VisitRequest

Request for a visit which can be done by a vehicle: it has a geo-location (or two, see below), opening and closing times represented by time windows, and a service duration time (time spent by the vehicle once it has arrived to pickup or drop off goods).

ক্ষেত্র
arrival_ location

LatLng

The geo-location where the vehicle arrives when performing this VisitRequest . If the shipment model has duration distance matrices, arrival_location must not be specified.

arrival_ waypoint

Waypoint

The waypoint where the vehicle arrives when performing this VisitRequest . If the shipment model has duration distance matrices, arrival_waypoint must not be specified.

departure_ location

LatLng

The geo-location where the vehicle departs after completing this VisitRequest . Can be omitted if it is the same as arrival_location . If the shipment model has duration distance matrices, departure_location must not be specified.

departure_ waypoint

Waypoint

The waypoint where the vehicle departs after completing this VisitRequest . Can be omitted if it is the same as arrival_waypoint . If the shipment model has duration distance matrices, departure_waypoint must not be specified.

tags[]

string

Specifies tags attached to the visit request. Empty or duplicate strings are not allowed.

time_ windows[]

TimeWindow

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, ie arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time .

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, ie no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

duration

Duration

Duration of the visit, ie time spent by the vehicle between arrival and departure (to be added to the possible waiting time; see time_windows ).

cost

double

Cost to service this visit request on a vehicle route. This can be used to pay different costs for each alternative pickup or delivery of a shipment. This cost must be in the same unit as Shipment.penalty_cost and must not be negative.

load_ demands

map<string, Load >

Load demands of this visit request. This is just like Shipment.load_demands field, except that it only applies to this VisitRequest instead of the whole Shipment . The demands listed here are added to the demands listed in Shipment.load_demands .

visit_ types[]

string

Specifies the types of the visit. This may be used to allocate additional time required for a vehicle to complete this visit (see Vehicle.extra_visit_duration_for_visit_type ).

A type can only appear once.

label

string

Specifies a label for this VisitRequest . This label is reported in the response as visit_label in the corresponding ShipmentRoute.Visit .

ShipmentModel

A shipment model contains a set of shipments which must be performed by a set of vehicles, while minimizing the overall cost, which is the sum of:

  • the cost of routing the vehicles (sum of cost per total time, cost per travel time, and fixed cost over all vehicles).
  • the unperformed shipment penalties.
  • the cost of the global duration of the shipments
ক্ষেত্র
shipments[]

Shipment

Set of shipments which must be performed in the model.

vehicles[]

Vehicle

Set of vehicles which can be used to perform visits.

global_ start_ time

Timestamp

Global start and end time of the model: no times outside of this range can be considered valid.

The model's time span must be less than a year, ie the global_end_time and the global_start_time must be within 31536000 seconds of each other.

When using cost_per_*hour fields, you might want to set this window to a smaller interval to increase performance (eg. if you model a single day, you should set the global time limits to that day). If unset, 00:00:00 UTC, January 1, 1970 (ie seconds: 0, nanos: 0) is used as default.

global_ end_ time

Timestamp

If unset, 00:00:00 UTC, January 1, 1971 (ie seconds: 31536000, nanos: 0) is used as default.

global_ duration_ cost_ per_ hour

double

The "global duration" of the overall plan is the difference between the earliest effective start time and the latest effective end time of all vehicles. Users can assign a cost per hour to that quantity to try and optimize for earliest job completion, for example. This cost must be in the same unit as Shipment.penalty_cost .

duration_ distance_ matrices[]

DurationDistanceMatrix

Specifies duration and distance matrices used in the model. If this field is empty, Google Maps or geodesic distances will be used instead, depending on the value of the use_geodesic_distances field. If it is not empty, use_geodesic_distances cannot be true and neither duration_distance_matrix_src_tags nor duration_distance_matrix_dst_tags can be empty.

ব্যবহারের উদাহরণ:

  • There are two locations: locA and locB.
  • 1 vehicle starting its route at locA and ending it at locA.
  • 1 pickup visit request at locB.
model {
  vehicles { start_tags: "locA"  end_tags: "locA" }
  shipments { pickups { tags: "locB" } }
  duration_distance_matrix_src_tags: "locA"
  duration_distance_matrix_src_tags: "locB"
  duration_distance_matrix_dst_tags: "locA"
  duration_distance_matrix_dst_tags: "locB"
  duration_distance_matrices {
    rows {  # from: locA
      durations { seconds: 0 }   meters: 0    # to: locA
      durations { seconds: 100 } meters: 1000 # to: locB
    }
    rows {  # from: locB
      durations { seconds: 102 } meters: 990 # to: locA
      durations { seconds: 0 }   meters: 0   # to: locB
    }
  }
}
  • There are three locations: locA, locB and locC.
  • 1 vehicle starting its route at locA and ending it at locB, using matrix "fast".
  • 1 vehicle starting its route at locB and ending it at locB, using matrix "slow".
  • 1 vehicle starting its route at locB and ending it at locB, using matrix "fast".
  • 1 pickup visit request at locC.
model {
  vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
  vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
  vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
  shipments { pickups { tags: "locC" } }
  duration_distance_matrix_src_tags: "locA"
  duration_distance_matrix_src_tags: "locB"
  duration_distance_matrix_src_tags: "locC"
  duration_distance_matrix_dst_tags: "locB"
  duration_distance_matrix_dst_tags: "locC"
  duration_distance_matrices {
    vehicle_start_tag: "fast"
    rows {  # from: locA
      durations { seconds: 1000 } meters: 2000 # to: locB
      durations { seconds: 600 }  meters: 1000 # to: locC
    }
    rows {  # from: locB
      durations { seconds: 0 }   meters: 0    # to: locB
      durations { seconds: 700 } meters: 1200 # to: locC
    }
    rows {  # from: locC
      durations { seconds: 702 } meters: 1190 # to: locB
      durations { seconds: 0 }   meters: 0    # to: locC
    }
  }
  duration_distance_matrices {
    vehicle_start_tag: "slow"
    rows {  # from: locA
      durations { seconds: 1800 } meters: 2001 # to: locB
      durations { seconds: 900 }  meters: 1002 # to: locC
    }
    rows {  # from: locB
      durations { seconds: 0 }    meters: 0    # to: locB
      durations { seconds: 1000 } meters: 1202 # to: locC
    }
    rows {  # from: locC
      durations { seconds: 1001 } meters: 1195 # to: locB
      durations { seconds: 0 }    meters: 0    # to: locC
    }
  }
}
duration_ distance_ matrix_ src_ tags[]

string

Tags defining the sources of the duration and distance matrices; duration_distance_matrices(i).rows(j) defines durations and distances from visits with tag duration_distance_matrix_src_tags(j) to other visits in matrix i.

Tags correspond to VisitRequest.tags or Vehicle.start_tags . A given VisitRequest or Vehicle must match exactly one tag in this field. Note that a Vehicle 's source, destination and matrix tags may be the same; similarly a VisitRequest 's source and destination tags may be the same. All tags must be different and cannot be empty strings. If this field is not empty, then duration_distance_matrices must not be empty.

duration_ distance_ matrix_ dst_ tags[]

string

Tags defining the destinations of the duration and distance matrices; duration_distance_matrices(i).rows(j).durations(k) (resp. duration_distance_matrices(i).rows(j).meters(k)) defines the duration (resp. the distance) of the travel from visits with tag duration_distance_matrix_src_tags(j) to visits with tag duration_distance_matrix_dst_tags(k) in matrix i.

Tags correspond to VisitRequest.tags or Vehicle.start_tags . A given VisitRequest or Vehicle must match exactly one tag in this field. Note that a Vehicle 's source, destination and matrix tags may be the same; similarly a VisitRequest 's source and destination tags may be the same. All tags must be different and cannot be empty strings. If this field is not empty, then duration_distance_matrices must not be empty.

transition_ attributes[]

TransitionAttributes

Transition attributes added to the model.

shipment_ type_ incompatibilities[]

ShipmentTypeIncompatibility

Sets of incompatible shipment_types (see ShipmentTypeIncompatibility ).

shipment_ type_ requirements[]

ShipmentTypeRequirement

Sets of shipment_type requirements (see ShipmentTypeRequirement ).

precedence_ rules[]

PrecedenceRule

Set of precedence rules which must be enforced in the model.

IMPORTANT : Use of precedence rules limits the size of problem that can be optimized. Requests using precedence rules that include many shipments may be rejected.

max_ active_ vehicles

int32

Constrains the maximum number of active vehicles. A vehicle is active if its route performs at least one shipment. This can be used to limit the number of routes in the case where there are fewer drivers than vehicles and that the fleet of vehicles is heterogeneous. The optimization will then select the best subset of vehicles to use. Must be strictly positive.

DurationDistanceMatrix

Specifies a duration and distance matrix from visit and vehicle start locations to visit and vehicle end locations.

ক্ষেত্র
rows[]

Row

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags .

vehicle_ start_ tag

string

Tag defining to which vehicles this duration and distance matrix applies. If empty, this applies to all vehicles, and there can only be a single matrix.

Each vehicle start must match exactly one matrix, ie exactly one of their start_tags field must match the vehicle_start_tag of a matrix (and of that matrix only).

All matrices must have a different vehicle_start_tag .

সারি

Specifies a row of the duration and distance matrix.

ক্ষেত্র
durations[]

Duration

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags .

meters[]

double

Distance values for a given row. If no costs or constraints refer to distances in the model, this can be left empty; otherwise it must have as many elements as durations .

PrecedenceRule

A precedence rule between two events (each event is the pickup or the delivery of a shipment): the "second" event has to start at least offset_duration after "first" has started.

Several precedences can refer to the same (or related) events, eg, "pickup of B happens after delivery of A" and "pickup of C happens after pickup of B".

Furthermore, precedences only apply when both shipments are performed and are otherwise ignored.

ক্ষেত্র
first_ is_ delivery

bool

Indicates if the "first" event is a delivery.

second_ is_ delivery

bool

Indicates if the "second" event is a delivery.

offset_ duration

Duration

The offset between the "first" and "second" event. It can be negative.

first_ index

int32

Shipment index of the "first" event. This field must be specified.

second_ index

int32

Shipment index of the "second" event. This field must be specified.

ShipmentRoute

A vehicle's route can be decomposed, along the time axis, like this (we assume there are n visits):

  |            |            |          |       |  T[2], |        |      |
  | Transition |  Visit #0  |          |       |  V[2], |        |      |
  |     #0     |    aka     |   T[1]   |  V[1] |  ...   | V[n-1] | T[n] |
  |  aka T[0]  |    V[0]    |          |       | V[n-2],|        |      |
  |            |            |          |       | T[n-1] |        |      |
  ^            ^            ^          ^       ^        ^        ^      ^
vehicle    V[0].start   V[0].end     V[1].   V[1].    V[n].    V[n]. vehicle
 start     (arrival)   (departure)   start   end      start    end     end

Note that we make a difference between:

  • "punctual events", such as the vehicle start and end and each visit's start and end (aka arrival and departure). They happen at a given second.
  • "time intervals", such as the visits themselves, and the transition between visits. Though time intervals can sometimes have zero duration, ie start and end at the same second, they often have a positive duration.

অপরিবর্তনীয়:

  • If there are n visits, there are n+1 transitions.
  • A visit is always surrounded by a transition before it (same index) and a transition after it (index + 1).
  • The vehicle start is always followed by transition #0.
  • The vehicle end is always preceded by transition #n.

Zooming in, here is what happens during a Transition and a Visit :

---+-------------------------------------+-----------------------------+-->
   |           TRANSITION[i]             |           VISIT[i]          |
   |                                     |                             |
   |  * TRAVEL: the vehicle moves from   |      PERFORM the visit:     |
   |    VISIT[i-1].departure_location to |                             |
   |    VISIT[i].arrival_location, which |  * Spend some time:         |
   |    takes a given travel duration    |    the "visit duration".    |
   |    and distance                     |                             |
   |                                     |  * Load or unload           |
   |  * BREAKS: the driver may have      |    some quantities from the |
   |    breaks (e.g. lunch break).       |    vehicle: the "demand".   |
   |                                     |                             |
   |  * WAIT: the driver/vehicle does    |                             |
   |    nothing. This can happen for     |                             |
   |    many reasons, for example when   |                             |
   |    the vehicle reaches the next     |                             |
   |    event's destination before the   |                             |
   |    start of its time window         |                             |
   |                                     |                             |
   |  * DELAY: *right before* the next   |                             |
   |    arrival. E.g. the vehicle and/or |                             |
   |    driver spends time unloading.    |                             |
   |                                     |                             |
---+-------------------------------------+-----------------------------+-->
   ^                                     ^                             ^
V[i-1].end                           V[i].start                    V[i].end

Lastly, here is how the TRAVEL, BREAKS, DELAY and WAIT can be arranged during a transition.

  • তারা ওভারল্যাপ না.
  • The DELAY is unique and must be a contiguous period of time right before the next visit (or vehicle end). Thus, it suffice to know the delay duration to know its start and end time.
  • The BREAKS are contiguous, non-overlapping periods of time. The response specifies the start time and duration of each break.
  • TRAVEL and WAIT are "preemptable": they can be interrupted several times during this transition. Clients can assume that travel happens "as soon as possible" and that "wait" fills the remaining time.

A (complex) example:

                               TRANSITION[i]
--++-----+-----------------------------------------------------------++-->
  ||     |       |           |       |           |         |         ||
  ||  T  |   B   |     T     |       |     B     |         |    D    ||
  ||  r  |   r   |     r     |   W   |     r     |    W    |    e    ||
  ||  a  |   e   |     a     |   a   |     e     |    a    |    l    ||
  ||  v  |   a   |     v     |   i   |     a     |    i    |    a    ||
  ||  e  |   k   |     e     |   t   |     k     |    t    |    y    ||
  ||  l  |       |     l     |       |           |         |         ||
  ||     |       |           |       |           |         |         ||
--++-----------------------------------------------------------------++-->
ক্ষেত্র
vehicle_ index

int32

Vehicle performing the route, identified by its index in the source ShipmentModel .

vehicle_ label

string

Label of the vehicle performing this route, equal to ShipmentModel.vehicles(vehicle_index).label , if specified.

vehicle_ start_ time

Timestamp

Time at which the vehicle starts its route.

vehicle_ end_ time

Timestamp

Time at which the vehicle finishes its route.

visits[]

Visit

Ordered sequence of visits representing a route. visits[i] is the i-th visit in the route. If this field is empty, the vehicle is considered as unused.

transitions[]

Transition

Ordered list of transitions for the route.

has_ traffic_ infeasibilities

bool

When OptimizeToursRequest.consider_road_traffic , is set to true, this field indicates that inconsistencies in route timings are predicted using traffic-based travel duration estimates. There may be insufficient time to complete traffic-adjusted travel, delays, and breaks between visits, before the first visit, or after the last visit, while still satisfying the visit and vehicle time windows. যেমন,

  start_time(previous_visit) + duration(previous_visit) +
  travel_duration(previous_visit, next_visit) > start_time(next_visit)

Arrival at next_visit will likely happen later than its current time window due the increased estimate of travel time travel_duration(previous_visit, next_visit) due to traffic. Also, a break may be forced to overlap with a visit due to an increase in travel time estimates and visit or break time window restrictions.

route_ polyline

EncodedPolyline

The encoded polyline representation of the route. This field is only populated if OptimizeToursRequest.populate_polylines is set to true.

breaks[]

Break

Breaks scheduled for the vehicle performing this route. The breaks sequence represents time intervals, each starting at the corresponding start_time and lasting duration seconds.

metrics

AggregatedMetrics

Duration, distance and load metrics for this route. The fields of AggregatedMetrics are summed over all ShipmentRoute.transitions or ShipmentRoute.visits , depending on the context.

route_ costs

map<string, double>

Cost of the route, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, eg "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole route. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the route. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

route_ total_ cost

double

Total cost of the route. The sum of all costs in the cost map.

বিরতি

Data representing the execution of a break.

ক্ষেত্র
start_ time

Timestamp

Start time of a break.

duration

Duration

Duration of a break.

EncodedPolyline

The encoded representation of a polyline. More information on polyline encoding can be found here: https://developers.google.com/maps/documentation/utilities/polylinealgorithm https://developers.google.com/maps/documentation/javascript/reference/geometry#encoding .

ক্ষেত্র
points

string

String representing encoded points of the polyline.

উত্তরণ

Transition between two events on the route. See the description of ShipmentRoute .

If the vehicle does not have a start_location and/or end_location , the corresponding travel metrics are 0.

ক্ষেত্র
travel_ duration

Duration

Travel duration during this transition.

travel_ distance_ meters

double

Distance traveled during the transition.

traffic_ info_ unavailable

bool

When traffic is requested via OptimizeToursRequest.consider_road_traffic , and the traffic info couldn't be retrieved for a Transition , this boolean is set to true. This may be temporary (rare hiccup in the realtime traffic servers) or permanent (no data for this location).

delay_ duration

Duration

Sum of the delay durations applied to this transition. If any, the delay starts exactly delay_duration seconds before the next event (visit or vehicle end). See TransitionAttributes.delay .

break_ duration

Duration

Sum of the duration of the breaks occurring during this transition, if any. Details about each break's start time and duration are stored in ShipmentRoute.breaks .

wait_ duration

Duration

Time spent waiting during this transition. Wait duration corresponds to idle time and does not include break time. Also note that this wait time may be split into several non-contiguous intervals.

total_ duration

Duration

Total duration of the transition, provided for convenience. It is equal to:

  • next visit start_time (or vehicle_end_time if this is the last transition) - this transition's start_time ;
  • if ShipmentRoute.has_traffic_infeasibilities is false, the following additionally holds: `total_duration = travel_duration + delay_duration
  • break_duration + wait_duration`.
start_ time

Timestamp

Start time of this transition.

route_ polyline

EncodedPolyline

The encoded polyline representation of the route followed during the transition. This field is only populated if populate_transition_polylines is set to true.

route_ token

string

শুধুমাত্র আউটপুট। An opaque token that can be passed to Navigation SDK to reconstruct the route during navigation, and, in the event of rerouting, honor the original intention when the route was created. Treat this token as an opaque blob. Don't compare its value across requests as its value may change even if the service returns the exact same route. This field is only populated if populate_transition_polylines is set to true.

vehicle_ loads

map<string, VehicleLoad >

Vehicle loads during this transition, for each type that either appears in this vehicle's Vehicle.load_limits , or that have non-zero Shipment.load_demands on some shipment performed on this route.

The loads during the first transition are the starting loads of the vehicle route. Then, after each visit, the visit's load_demands are either added or subtracted to get the next transition's loads, depending on whether the visit was a pickup or a delivery.

VehicleLoad

Reports the actual load of the vehicle at some point along the route, for a given type (see Transition.vehicle_loads ).

ক্ষেত্র
amount

int64

The amount of load on the vehicle, for the given type. The unit of load is usually indicated by the type. See Transition.vehicle_loads .

ভিজিট করুন

A visit performed during a route. This visit corresponds to a pickup or a delivery of a Shipment .

ক্ষেত্র
shipment_ index

int32

Index of the shipments field in the source ShipmentModel .

is_ pickup

bool

If true the visit corresponds to a pickup of a Shipment . Otherwise, it corresponds to a delivery.

visit_ request_ index

int32

Index of VisitRequest in either the pickup or delivery field of the Shipment (see is_pickup ).

start_ time

Timestamp

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel .

load_ demands

map<string, Load >

Total visit load demand as the sum of the shipment and the visit request load_demands . The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

detour

Duration

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to:

start_time(delivery) - start_time(pickup)
- (duration(pickup) + travel duration from the pickup location
to the delivery location).

Otherwise, it is computed from the vehicle start_location and is equal to:

start_time - vehicle_start_time - travel duration from
the vehicle's `start_location` to the visit.
shipment_ label

string

Copy of the corresponding Shipment.label , if specified in the Shipment .

visit_ label

string

Copy of the corresponding VisitRequest.label , if specified in the VisitRequest .

ShipmentTypeIncompatibility

Specifies incompatibilties between shipments depending on their shipment_type. The appearance of incompatible shipments on the same route is restricted based on the incompatibility mode.

ক্ষেত্র
types[]

string

List of incompatible types. Two shipments having different shipment_types among those listed are "incompatible".

incompatibility_ mode

IncompatibilityMode

Mode applied to the incompatibility.

IncompatibilityMode

Modes defining how the appearance of incompatible shipments are restricted on the same route.

Enums
INCOMPATIBILITY_MODE_UNSPECIFIED Unspecified incompatibility mode. This value should never be used.
NOT_PERFORMED_BY_SAME_VEHICLE In this mode, two shipments with incompatible types can never share the same vehicle.
NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY

For two shipments with incompatible types with the NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY incompatibility mode:

  • If both are pickups only (no deliveries) or deliveries only (no pickups), they cannot share the same vehicle at all.
  • If one of the shipments has a delivery and the other a pickup, the two shipments can share the same vehicle iff the former shipment is delivered before the latter is picked up.

ShipmentTypeRequirement

Specifies requirements between shipments based on their shipment_type. The specifics of the requirement are defined by the requirement mode.

ক্ষেত্র
required_ shipment_ type_ alternatives[]

string

List of alternative shipment types required by the dependent_shipment_types .

dependent_ shipment_ types[]

string

All shipments with a type in the dependent_shipment_types field require at least one shipment of type required_shipment_type_alternatives to be visited on the same route.

NOTE: Chains of requirements such that a shipment_type depends on itself are not allowed.

requirement_ mode

RequirementMode

Mode applied to the requirement.

RequirementMode

Modes defining the appearance of dependent shipments on a route.

Enums
REQUIREMENT_MODE_UNSPECIFIED Unspecified requirement mode. This value should never be used.
PERFORMED_BY_SAME_VEHICLE In this mode, all "dependent" shipments must share the same vehicle as at least one of their "required" shipments.
IN_SAME_VEHICLE_AT_PICKUP_TIME

With the IN_SAME_VEHICLE_AT_PICKUP_TIME mode, all "dependent" shipments need to have at least one "required" shipment on their vehicle at the time of their pickup.

A "dependent" shipment pickup must therefore have either:

  • A delivery-only "required" shipment delivered on the route after, or
  • A "required" shipment picked up on the route before it, and if the "required" shipment has a delivery, this delivery must be performed after the "dependent" shipment's pickup.
IN_SAME_VEHICLE_AT_DELIVERY_TIME Same as before, except the "dependent" shipments need to have a "required" shipment on their vehicle at the time of their delivery .

SkippedShipment

Specifies details of unperformed shipments in a solution. For trivial cases and/or if we are able to identify the cause for skipping, we report the reason here.

ক্ষেত্র
index

int32

The index corresponds to the index of the shipment in the source ShipmentModel .

label

string

Copy of the corresponding Shipment.label , if specified in the Shipment .

reasons[]

Reason

A list of reasons that explain why the shipment was skipped. See comment above Reason . If we are unable to understand why a shipment was skipped, reasons will not be set.

কারণ

If we can explain why the shipment was skipped, reasons will be listed here. If the reason is not the same for all vehicles, reason will have more than 1 element. A skipped shipment cannot have duplicate reasons, ie where all fields are the same except for example_vehicle_index . উদাহরণ:

reasons {
  code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
  example_vehicle_index: 1
  example_exceeded_capacity_type: "Apples"
}
reasons {
  code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
  example_vehicle_index: 3
  example_exceeded_capacity_type: "Pears"
}
reasons {
  code: CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT
  example_vehicle_index: 1
}

The skipped shipment is incompatible with all vehicles. The reasons may be different for all vehicles but at least one vehicle's "Apples" capacity would be exceeded (including vehicle 1), at least one vehicle's "Pears" capacity would be exceeded (including vehicle 3) and at least one vehicle's distance limit would be exceeded (including vehicle 1).

ক্ষেত্র
code

Code

Refer to the comments of Code.

example_ exceeded_ capacity_ type

string

If the reason code is DEMAND_EXCEEDS_VEHICLE_CAPACITY , documents one capacity type that is exceeded.

example_ vehicle_ index

int32

If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.

কোড

Code identifying the reason type. The order here is meaningless. In particular, it gives no indication of whether a given reason will appear before another in the solution, if both apply.

Enums
CODE_UNSPECIFIED This should never be used.
NO_VEHICLE There is no vehicle in the model making all shipments infeasible.
DEMAND_EXCEEDS_VEHICLE_CAPACITY The demand of the shipment exceeds a vehicle's capacity for some capacity types, one of which is example_exceeded_capacity_type .
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT

The minimum distance necessary to perform this shipment, ie from the vehicle's start_location to the shipment's pickup and/or delivery locations and to the vehicle's end location exceeds the vehicle's route_distance_limit .

Note that for this computation we use the geodesic distances.

CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT

The minimum time necessary to perform this shipment, including travel time, wait time and service time exceeds the vehicle's route_duration_limit .

Note: travel time is computed in the best-case scenario, namely as geodesic distance x 36 m/s (roughly 130 km/hour).

CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT Same as above but we only compare minimum travel time and the vehicle's travel_duration_limit .
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS The vehicle cannot perform this shipment in the best-case scenario (see CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT for time computation) if it starts at its earliest start time: the total time would make the vehicle end after its latest end time.
VEHICLE_NOT_ALLOWED The allowed_vehicle_indices field of the shipment is not empty and this vehicle does not belong to it.

টাইম উইন্ডো

Time windows constrain the time of an event, such as the arrival time at a visit, or the start and end time of a vehicle.

Hard time window bounds, start_time and end_time , enforce the earliest and latest time of the event, such that start_time <= event_time <= end_time . The soft time window lower bound, soft_start_time , expresses a preference for the event to happen at or after soft_start_time by incurring a cost proportional to how long before soft_start_time the event occurs. The soft time window upper bound, soft_end_time , expresses a preference for the event to happen at or before soft_end_time by incurring a cost proportional to how long after soft_end_time the event occurs. start_time , end_time , soft_start_time and soft_end_time should be within the global time limits (see ShipmentModel.global_start_time and ShipmentModel.global_end_time ) and should respect:

  0 <= `start_time` <= `end_time` and
  0 <= `start_time` <= `soft_start_time` and
  0 <= `soft_end_time` <= `end_time`.
ক্ষেত্র
start_ time

Timestamp

The hard time window start time. If unspecified it will be set to ShipmentModel.global_start_time .

end_ time

Timestamp

The hard time window end time. If unspecified it will be set to ShipmentModel.global_end_time .

soft_ start_ time

Timestamp

The soft start time of the time window.

soft_ end_ time

Timestamp

The soft end time of the time window.

cost_ per_ hour_ before_ soft_ start_ time

double

A cost per hour added to other costs in the model if the event occurs before soft_start_time, computed as:

   max(0, soft_start_time - t.seconds)
                          * cost_per_hour_before_soft_start_time / 3600,
t being the time of the event.

This cost must be positive, and the field can only be set if soft_start_time has been set.

cost_ per_ hour_ after_ soft_ end_ time

double

A cost per hour added to other costs in the model if the event occurs after soft_end_time , computed as:

   max(0, t.seconds - soft_end_time.seconds)
                    * cost_per_hour_after_soft_end_time / 3600,
t being the time of the event.

This cost must be positive, and the field can only be set if soft_end_time has been set.

TransitionAttributes

Specifies attributes of transitions between two consecutive visits on a route. Several TransitionAttributes may apply to the same transition: in that case, all extra costs add up and the strictest constraint or limit applies (following natural "AND" semantics).

ক্ষেত্র
src_ tag

string

Tags defining the set of (src->dst) transitions these attributes apply to.

A source visit or vehicle start matches iff its VisitRequest.tags or Vehicle.start_tags either contains src_tag or does not contain excluded_src_tag (depending on which of these two fields is non-empty).

excluded_ src_ tag

string

See src_tag . Exactly one of src_tag and excluded_src_tag must be non-empty.

dst_ tag

string

A destination visit or vehicle end matches iff its VisitRequest.tags or Vehicle.end_tags either contains dst_tag or does not contain excluded_dst_tag (depending on which of these two fields is non-empty).

excluded_ dst_ tag

string

See dst_tag . Exactly one of dst_tag and excluded_dst_tag must be non-empty.

cost

double

Specifies a cost for performing this transition. This is in the same unit as all other costs in the model and must not be negative. It is applied on top of all other existing costs.

cost_ per_ kilometer

double

Specifies a cost per kilometer applied to the distance traveled while performing this transition. It adds up to any Vehicle.cost_per_kilometer specified on vehicles.

distance_ limit

DistanceLimit

Specifies a limit on the distance traveled while performing this transition.

As of 2021/06, only soft limits are supported.

delay

Duration

Specifies a delay incurred when performing this transition.

This delay always occurs after finishing the source visit and before starting the destination visit.

যানবাহন

Models a vehicle in a shipment problem. Solving a shipment problem will build a route starting from start_location and ending at end_location for this vehicle. A route is a sequence of visits (see ShipmentRoute ).

ক্ষেত্র
display_ name

string

The user-defined display name of the vehicle. It can be up to 63 characters long and may use UTF-8 characters.

travel_ mode

TravelMode

The travel mode which affects the roads usable by the vehicle and its speed. See also travel_duration_multiple .

route_ modifiers

RouteModifiers

A set of conditions to satisfy that affect the way routes are calculated for the given vehicle.

start_ location

LatLng

Geographic location where the vehicle starts before picking up any shipments. If not specified, the vehicle starts at its first pickup. If the shipment model has duration and distance matrices, start_location must not be specified.

start_ waypoint

Waypoint

Waypoint representing a geographic location where the vehicle starts before picking up any shipments. If neither start_waypoint nor start_location is specified, the vehicle starts at its first pickup. If the shipment model has duration and distance matrices, start_waypoint must not be specified.

end_ location

LatLng

Geographic location where the vehicle ends after it has completed its last VisitRequest . If not specified the vehicle's ShipmentRoute ends immediately when it completes its last VisitRequest . If the shipment model has duration and distance matrices, end_location must not be specified.

end_ waypoint

Waypoint

Waypoint representing a geographic location where the vehicle ends after it has completed its last VisitRequest . If neither end_waypoint nor end_location is specified, the vehicle's ShipmentRoute ends immediately when it completes its last VisitRequest . If the shipment model has duration and distance matrices, end_waypoint must not be specified.

start_ tags[]

string

Specifies tags attached to the start of the vehicle's route.

Empty or duplicate strings are not allowed.

end_ tags[]

string

Specifies tags attached to the end of the vehicle's route.

Empty or duplicate strings are not allowed.

start_ time_ windows[]

TimeWindow

Time windows during which the vehicle may depart its start location. They must be within the global time limits (see ShipmentModel.global_* fields). If unspecified, there is no limitation besides those global time limits.

Time windows belonging to the same repeated field must be disjoint, ie no time window can overlap with or be adjacent to another, and they must be in chronological order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

end_ time_ windows[]

TimeWindow

Time windows during which the vehicle may arrive at its end location. They must be within the global time limits (see ShipmentModel.global_* fields). If unspecified, there is no limitation besides those global time limits.

Time windows belonging to the same repeated field must be disjoint, ie no time window can overlap with or be adjacent to another, and they must be in chronological order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

unloading_ policy

UnloadingPolicy

Unloading policy enforced on the vehicle.

load_ limits

map<string, LoadLimit >

Capacities of the vehicle (weight, volume, # of pallets for example). The keys in the map are the identifiers of the type of load, consistent with the keys of the Shipment.load_demands field. If a given key is absent from this map, the corresponding capacity is considered to be limitless.

cost_ per_ hour

double

Vehicle costs: all costs add up and must be in the same unit as Shipment.penalty_cost .

Cost per hour of the vehicle route. This cost is applied to the total time taken by the route, and includes travel time, waiting time, and visit time. Using cost_per_hour instead of just cost_per_traveled_hour may result in additional latency.

cost_ per_ traveled_ hour

double

Cost per traveled hour of the vehicle route. This cost is applied only to travel time taken by the route (ie, that reported in ShipmentRoute.transitions ), and excludes waiting time and visit time.

cost_ per_ kilometer

double

Cost per kilometer of the vehicle route. This cost is applied to the distance reported in the ShipmentRoute.transitions and does not apply to any distance implicitly traveled from the arrival_location to the departure_location of a single VisitRequest .

fixed_ cost

double

Fixed cost applied if this vehicle is used to handle a shipment.

used_ if_ route_ is_ empty

bool

This field only applies to vehicles when their route does not serve any shipments. It indicates if the vehicle should be considered as used or not in this case.

If true, the vehicle goes from its start to its end location even if it doesn't serve any shipments, and time and distance costs resulting from its start --> end travel are taken into account.

Otherwise, it doesn't travel from its start to its end location, and no break_rule or delay (from TransitionAttributes ) are scheduled for this vehicle. In this case, the vehicle's ShipmentRoute doesn't contain any information except for the vehicle index and label.

route_ duration_ limit

DurationLimit

Limit applied to the total duration of the vehicle's route. In a given OptimizeToursResponse , the route duration of a vehicle is the difference between its vehicle_end_time and vehicle_start_time .

travel_ duration_ limit

DurationLimit

Limit applied to the travel duration of the vehicle's route. In a given OptimizeToursResponse , the route travel duration is the sum of all its transitions.travel_duration .

route_ distance_ limit

DistanceLimit

Limit applied to the total distance of the vehicle's route. In a given OptimizeToursResponse , the route distance is the sum of all its transitions.travel_distance_meters .

extra_ visit_ duration_ for_ visit_ type

map<string, Duration >

Specifies a map from visit_types strings to durations. The duration is time in addition to VisitRequest.duration to be taken at visits with the specified visit_types . This extra visit duration adds cost if cost_per_hour is specified. Keys (ie visit_types ) cannot be empty strings.

If a visit request has multiple types, a duration will be added for each type in the map.

break_ rule

BreakRule

Describes the break schedule to be enforced on this vehicle. If empty, no breaks will be scheduled for this vehicle.

label

string

Specifies a label for this vehicle. This label is reported in the response as the vehicle_label of the corresponding ShipmentRoute .

ignore

bool

If true, used_if_route_is_empty must be false, and this vehicle will remain unused.

If a shipment is performed by an ignored vehicle in injected_first_solution_routes , it is skipped in the first solution but is free to be performed in the response.

If a shipment is performed by an ignored vehicle in injected_solution_constraint and any related pickup/delivery is constrained to remain on the vehicle (ie, not relaxed to level RELAX_ALL_AFTER_THRESHOLD ), it is skipped in the response. If a shipment has a non-empty allowed_vehicle_indices field and all of the allowed vehicles are ignored, it is skipped in the response.

travel_ duration_ multiple

double

Specifies a multiplicative factor that can be used to increase or decrease travel times of this vehicle. For example, setting this to 2.0 means that this vehicle is slower and has travel times that are twice what they are for standard vehicles. This multiple does not affect visit durations. It does affect cost if cost_per_hour or cost_per_traveled_hour are specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle is standard, and this multiple is considered 1.0.

WARNING: Travel times will be rounded to the nearest second after this multiple is applied but before performing any numerical operations, thus, a small multiple may result in a loss of precision.

See also extra_visit_duration_for_visit_type below.

DurationLimit

A limit defining a maximum duration of the route of a vehicle. It can be either hard or soft.

When a soft limit field is defined, both the soft max threshold and its associated cost must be defined together.

ক্ষেত্র
max_ duration

Duration

A hard limit constraining the duration to be at most max_duration.

soft_ max_ duration

Duration

A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost. This cost adds up to other costs defined in the model, with the same unit.

If defined, soft_max_duration must be nonnegative. If max_duration is also defined, soft_max_duration must be less than max_duration.

quadratic_ soft_ max_ duration

Duration

A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost, quadratic in the duration. This cost adds up to other costs defined in the model, with the same unit.

If defined, quadratic_soft_max_duration must be nonnegative. If max_duration is also defined, quadratic_soft_max_duration must be less than max_duration , and the difference must be no larger than one day:

max_duration - quadratic_soft_max_duration <= 86400 seconds

cost_ per_ hour_ after_ soft_ max

double

Cost per hour incurred if the soft_max_duration threshold is violated. The additional cost is 0 if the duration is under the threshold, otherwise the cost depends on the duration as follows:

  cost_per_hour_after_soft_max * (duration - soft_max_duration)

The cost must be nonnegative.

cost_ per_ square_ hour_ after_ quadratic_ soft_ max

double

Cost per square hour incurred if the quadratic_soft_max_duration threshold is violated.

The additional cost is 0 if the duration is under the threshold, otherwise the cost depends on the duration as follows:

  cost_per_square_hour_after_quadratic_soft_max *
  (duration - quadratic_soft_max_duration)^2

The cost must be nonnegative.

LoadLimit

Defines a load limit applying to a vehicle, eg "this truck may only carry up to 3500 kg". See load_limits .

ক্ষেত্র
soft_ max_ load

int64

A soft limit of the load. See cost_per_unit_above_soft_max .

cost_ per_ unit_ above_ soft_ max

double

If the load ever exceeds soft_max_load along this vehicle's route, the following cost penalty applies (only once per vehicle): (load - soft_max_load ) * cost_per_unit_above_soft_max . All costs add up and must be in the same unit as Shipment.penalty_cost .

start_ load_ interval

Interval

The acceptable load interval of the vehicle at the start of the route.

end_ load_ interval

Interval

The acceptable load interval of the vehicle at the end of the route.

max_ load

int64

The maximum acceptable amount of load.

ব্যবধান

Interval of acceptable load amounts.

ক্ষেত্র
min

int64

A minimum acceptable load. Must be ≥ 0. If they're both specified, min must be ≤ max .

max

int64

A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum load is unrestricted by this message. If they're both specified, min must be ≤ max .

TravelMode

Travel modes which can be used by vehicles.

These should be a subset of the Google Maps Platform Routes API travel modes, see: https://developers.google.com/maps/documentation/routes/reference/rest/v2/RouteTravelMode

Note: WALKING routes are in beta and might sometimes be missing clear sidewalks or pedestrian paths. You must display this warning to the user for all walking routes that you display in your app.

Enums
TRAVEL_MODE_UNSPECIFIED Unspecified travel mode, equivalent to DRIVING .
DRIVING Travel mode corresponding to driving directions (car, ...).
WALKING Travel mode corresponding to walking directions.

UnloadingPolicy

Policy on how a vehicle can be unloaded. Applies only to shipments having both a pickup and a delivery.

Other shipments are free to occur anywhere on the route independent of unloading_policy .

Enums
UNLOADING_POLICY_UNSPECIFIED Unspecified unloading policy; deliveries must just occur after their corresponding pickups.
LAST_IN_FIRST_OUT Deliveries must occur in reverse order of pickups
FIRST_IN_FIRST_OUT Deliveries must occur in the same order as pickups

ওয়েপয়েন্ট

Encapsulates a waypoint. Waypoints mark arrival and departure locations of VisitRequests, and start and end locations of Vehicles.

ক্ষেত্র
side_ of_ road

bool

ঐচ্ছিক। Indicates that the location of this waypoint is meant to have a preference for the vehicle to stop at a particular side of road. When you set this value, the route will pass through the location so that the vehicle can stop at the side of road that the location is biased towards from the center of the road. This option doesn't work for the 'WALKING' travel mode.

Union field location_type . Different ways to represent a location. location_type can be only one of the following:
location

Location

A point specified using geographic coordinates, including an optional heading.

place_ id

string

The POI place ID associated with the waypoint.

When using a place ID to specify arrival or departure location of a VisitRequest, use a place ID that is specific enough to determine a LatLng location for navigation to the place. For example, a place ID representing a building is suitable, but a place ID representing a road is discouraged.