SDMP User Manual (ENG)
  • Introduction
    • Introduction to SDMP
  • Getting Started
    • Creating SDMP Project
  • Data Handling
    • Loading Input Data
      • Defining Input Data Schema
      • Creating Input Data
      • Loading Input Data
    • Retriving Data
    • Writing Output Data
      • Defining Output Data Schema
      • Adding Data Row
      • Writing to File
  • General Module
    • Overview
    • User Controls
      • StateControl
      • ActionControl
      • StateTransitionControl
      • BoundControl
      • ApproximationControl
      • SolverControl
      • EventControl
      • DataControl
      • LogControl
    • Data Model
      • State
      • StateActionMap
    • Example Problems
      • Car Resequencing Problem
      • Lot Sizing Problem
  • Routing Module
    • Overview
    • User Controls
      • CustomerControl
      • VehicleControl
    • Data Model
    • Example Problems
      • Vehicle Routing Problem
  • Scheduling Module
    • Overview
    • User Controls
    • Data Model
    • Example Problems
Powered by GitBook
On this page
  1. Routing Module
  2. User Controls

VehicleControl

Controls for functions related to vehicle

GetLoadableResources

public override List<Resource> GetLoadableResources(Product product, Vehicle vehicle)

Definition

Returns a list of resources in the corresponding vehicle that can handle the product.

Parameters

Type
Description

Product

The product object.

Vehicle

The vehicle object.

Return

Type
Description
Default

List<Resource>

A list of resources that can be processed.

Example (Default Logic)

public override List<Resource> GetLoadableResources(Product product, Vehicle vehicle)
{
    List<Resource> list = new List<Resource>();

    foreach (KeyValuePair<string, Resource> item in vehicle.Resources)
    {
        Resource res = item.Value;

        if (res.Product.ID != product.ID)
            continue;

        list.Add(res);
    }

    return list;
}
PreviousCustomerControlNextData Model

Last updated 1 year ago

Default Logic