# The open-vrp Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

# The open-vrp Reference Manual

This is the open-vrp Reference Manual, version 0.6.3, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 04:22:38 2018 GMT+0.

Next: , Previous: , Up: Top   [Contents][Index]

# Open-VRP

Check out the Wiki for an overview of Open-VRP or scroll down for a summary, fork and get-started!

## Synopsis

Open VRP is a framework to model and solve VRP-like problems for students, academics, businesses and hobbyist alike. This framework allows for quick implementation of simple TSP/VRP problems to more complicated VRPTW, PDPTW, MDCPVRPPDTW, or however cool you want to sound. The library is extensibly written in Common Lisp's CLOS. Depending on your interest/purpose, an algorithm can be:

The Problem object (e.g. VRP) and the Algorithm object (e.g. Genetic Algorithm) are modelled seperately and combined with the generic method (solve-prob problem algo). Different solution algorithms can be tested and compared against each other on the same problem (which you only model once).

## Current features (v. 0.6.2)

• TSP, VRP, CVRP, VRPTW, CVRPTW
• Homogenous/heterogenous fleet
• Demands, duration, capacity, time-windows, speed
• Define network using coordinates or (asymettric) distance matrix
• Tabu Search
• Logging of search progress (to file or to REPL)
• Plotting of final solution or after each iteration
• Test-case loader (Solomon and TSPLIB format)
• Batch-run to test algo on a directory of test-cases

## Vision

Too often have I found myself having to build a VRP model from scratch, just to experiment with some meta-heuristics for a school paper. Academics/students with a background/interest in Mathematics/Operations Research without the skills/patience for die-hard coding (in C++/Java), have no choice but to spend their valuable time stuck in the debug/test/debug cycle. Here is why those in OR should consider Common Lisp as an option.

With this framework, I hope to catalyze the research and application of routing solutions. Researchers in innovative new algorithms should not need to fiddle in the Eclipse debugger screen. They should be able to focus all their energy and effort in devising their heuristics. OR should be kept fun and engaging.

The ultimate vision for Open VRP is a simple intuitive toolkit for the OR community, free for anyone.

## Installation

``````~\$ git clone git://github.com/mck-/Open-VRP.git
``````

Add this path and evaluate require:

``````(push "/path/to/Open-VRP/" asdf:*central-registry*)
(require 'open-vrp)
(in-package :open-vrp)
``````

## Usage

Check the Wiki for more documentation, the following is a short summary of the main functionality.

`solve-prob` expects a problem object and an algo object.

`test-vrp`, `solomon25`, `solomon100`, `christofides-1` and `christofides-2` are pre-loaded demo problems. To use Tabu Search:

``````(solve-prob test-vrp (make-instance 'tabu-search :iterations 10 :animatep T))
(solve-prob solomon100 (make-instance 'tabu-search :iterations 100))
(solve-prob christofides-2 (make-instance 'tabu-search :iterations 50))
``````

By default, problems will plot to `plots/name.png` and log to `run-logs/name.txt` where name refers to the `:name` slot of the Problem object. `(toggle-plot <problem>)` to disable plotting the final solution. Use `(set-log-mode <problem> x)` to switch from [0] no logging, [1] logging to file or [2] logging to the REPL.

If you don't like the legend in the plot, turn it off with `(toggle-legend <problem>)`.

When :animatep is set to T, each iteration will produce a plot in run-frames/Iteration x.png (much slower, since it needs to plot each iteration). You may use `(toggle-animate <algo>)` to turn it on/off.

You can define your own problem objects with:

``````(define-problem "VRP" fleet-size :node-coords-list node-coords :to-depot T)
(define-problem "CVRP" fleet-size :node-coords-list node-coords :demands demands-list :capacities capacity-list)
(define-problem "VRPTW" fleet-size :node-coords-list node-coords :time-windows time-windows :durations durations :speeds speed)
``````

where node-coords is a list of pairs, demands-list a list of associated demands (must be same length), and fleet-size is the number of vehicles. When a demands-list and vehicle capacity are provided, the resulting problem is a CVRP. If time-windows (list of pairs) and durations are given, the resulting problem object is a VRPTW. When everything is provided, it creates a CVRPTW. Each class of problem has its own specific constraints to check.

You may also provide a(n asymmetric) distance matrix instead of node-coords (real-life problems). You won't be able to plot the solution without node-coords though.

``````(define-problem "ASYM-CVRP" 3 :demands '(0 1 2 3 2 1) :capacities 8 :dist-array dist-aray)
``````

Note that the above will create 6 nodes, so the dimensions of the dist-array must be 6x6. Also note that we provide a single number for capacities (instead of a list with length 3), which means that all vehicles will have a capacity of 8. Single numbers are allowed for :demands, :durations, :capacites and :speeds

Or to load a problem from a text-file (currently supports Solomon-format and TSPLIB cvrp format):

``````(defvar test-case-solomon (load-test-case-file "path-to-solomon-file-format.txt"))
``````

When the algo is finished running, it returns the Algo object, which contains :current-sol and :best-sol. Use `iterate-more` to keep searching:

``````(iterate-more <algo> int)
``````

## Output

An example output of Solomon's VRPTW 100-customers benchmark test-case, solved with Tabu Search.

## TODO

• Extend VRP model to PDPTW
• Run logs/statistics for test-result gathering (including batch runs)
• User-interface (better macros)
• Plotting can be improved (real-time output instead of .png files)
• ...

Open-VRP is licensed under the terms of the Lisp Lesser GNU Public License, known as the LLGPL. The LLGPL consists of a preamble (see above URL) and the LGPL. Where these conflict, the preamble takes precedence. Open-VRP is referenced in the preamble as the "LIBRARY."

Next: , Previous: , Up: Top   [Contents][Index]

## 2 Systems

The main system appears first, followed by any subsystem dependency.

Next: , Previous: , Up: Systems   [Contents][Index]

### 2.1 open-vrp

Author

Marc Kuo

LLGPL

Description

open-vrp

Version

0.6.3

Dependencies
Source

open-vrp.asd (file)

Components

Previous: , Up: Systems   [Contents][Index]

### 2.2 open-vrp-lib

Author

Marc Kuo

LLGPL

Description

open-vrp-library

Version

0.6.3

Dependencies
• vecto
• alexandria
• fiveam
Source

open-vrp-lib.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

## 3 Modules

Modules are listed depth-first from the system components tree.

Next: , Previous: , Up: Modules   [Contents][Index]

### 3.1 open-vrp/algo

Parent

open-vrp (system)

Location

algo/

Components

Next: , Previous: , Up: Modules   [Contents][Index]

### 3.2 open-vrp/test-cases

Dependency

algo (module)

Parent

open-vrp (system)

Location

test-cases/

Components

Previous: , Up: Modules   [Contents][Index]

### 3.3 open-vrp-lib/lib

Dependency

packages.lisp (file)

Parent

open-vrp-lib (system)

Location

lib/

Components

Next: , Previous: , Up: Top   [Contents][Index]

## 4 Files

Files are sorted by type and then listed depth-first from the systems components trees.

Previous: , Up: Files   [Contents][Index]

### 4.1 Lisp

Next: , Previous: , Up: Lisp files   [Contents][Index]

#### 4.1.1 open-vrp.asd

Location

open-vrp.asd

Systems

open-vrp (system)

Next: , Previous: , Up: Lisp files   [Contents][Index]

#### 4.1.2 open-vrp-lib.asd

Location

open-vrp-lib.asd

Systems

open-vrp-lib (system)

Next: , Previous: , Up: Lisp files   [Contents][Index]

#### 4.1.3 open-vrp/algo/algo-conditions.lisp

Parent

algo (module)

Location

algo/algo-conditions.lisp

Exported Definitions

tabu-list (method)

Internal Definitions

#### 4.1.4 open-vrp/algo/tools.lisp

Parent

algo (module)

Location

algo/tools.lisp

Exported Definitions
Internal Definitions

#### 4.1.5 open-vrp/algo/iterator.lisp

Parent

algo (module)

Location

algo/iterator.lisp

Exported Definitions

#### 4.1.6 open-vrp/algo/best-insertion.lisp

Parent

algo (module)

Location

algo/best-insertion.lisp

Exported Definitions
Internal Definitions

generate-insertion-moves (function)

#### 4.1.7 open-vrp/algo/greedy-NN.lisp

Parent

algo (module)

Location

algo/greedy-NN.lisp

Exported Definitions

#### 4.1.8 open-vrp/algo/greedy-append.lisp

Parent

algo (module)

Location

algo/greedy-append.lisp

Exported Definitions

#### 4.1.9 open-vrp/algo/greedy-best-insertion.lisp

Parent

algo (module)

Location

algo/greedy-best-insertion.lisp

Exported Definitions

#### 4.1.10 open-vrp/algo/TS-classdef.lisp

Parent

algo (module)

Location

algo/TS-classdef.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

#### 4.1.11 open-vrp/algo/TS-utils.lisp

Parent

algo (module)

Location

algo/TS-utils.lisp

Exported Definitions
Internal Definitions

#### 4.1.12 open-vrp/algo/TS.lisp

Parent

algo (module)

Location

algo/TS.lisp

Exported Definitions
Internal Definitions

#### 4.1.13 open-vrp/test-cases/test-cases.lisp

Parent

test-cases (module)

Location

test-cases/test-cases.lisp

Exported Definitions

#### 4.1.14 open-vrp/test-cases/test-suite.lisp

Parent

test-cases (module)

Location

test-cases/test-suite.lisp

Internal Definitions

#### 4.1.15 open-vrp-lib/packages.lisp

Parent

open-vrp-lib (system)

Location

packages.lisp

Packages

#### 4.1.16 open-vrp-lib/lib/class-definitions.lisp

Parent

lib (module)

Location

lib/class-definitions.lisp

Exported Definitions
Internal Definitions

#### 4.1.17 open-vrp-lib/lib/simple-utils.lisp

Parent

lib (module)

Location

lib/simple-utils.lisp

Exported Definitions
Internal Definitions

vrp-object (function)

#### 4.1.18 open-vrp-lib/lib/list.lisp

Parent

lib (module)

Location

lib/list.lisp

Exported Definitions
Internal Definitions

#### 4.1.19 open-vrp-lib/lib/network.lisp

Parent

lib (module)

Location

lib/network.lisp

Exported Definitions
Internal Definitions

#### 4.1.20 open-vrp-lib/lib/fleet.lisp

Parent

lib (module)

Location

lib/fleet.lisp

Exported Definitions

#### 4.1.21 open-vrp-lib/lib/fitness.lisp

Parent

lib (module)

Location

lib/fitness.lisp

Exported Definitions

#### 4.1.22 open-vrp-lib/lib/output.lisp

Parent

lib (module)

Location

lib/output.lisp

Exported Definitions
Internal Definitions

#### 4.1.23 open-vrp-lib/lib/route.lisp

Parent

lib (module)

Location

lib/route.lisp

Exported Definitions
Internal Definitions

change-route (macro)

#### 4.1.24 open-vrp-lib/lib/draw-solution.lisp

Parent

lib (module)

Location

lib/draw-solution.lisp

Exported Definitions
Internal Definitions

#### 4.1.25 open-vrp-lib/lib/solver.lisp

Parent

lib (module)

Location

lib/solver.lisp

Exported Definitions
Internal Definitions

#### 4.1.26 open-vrp-lib/lib/constraints.lisp

Parent

lib (module)

Location

lib/constraints.lisp

Exported Definitions

#### 4.1.27 open-vrp-lib/lib/conditions.lisp

Parent

lib (module)

Location

lib/conditions.lisp

Exported Definitions
Internal Definitions

#### 4.1.28 open-vrp-lib/lib/init-macros.lisp

Parent

lib (module)

Location

lib/init-macros.lisp

Exported Definitions
Internal Definitions

Parent

lib (module)

Location

Exported Definitions

Internal Definitions

couple-lists (function)

Parent

lib (module)

Location

Exported Definitions

Internal Definitions

#### 4.1.31 open-vrp-lib/lib/config-functions.lisp

Parent

lib (module)

Location

lib/config-functions.lisp

Exported Definitions

Parent

lib (module)

Location

Exported Definitions

Previous: , Up: Lisp files   [Contents][Index]

#### 4.1.33 open-vrp-lib/lib/batch-run.lisp

Parent

lib (module)

Location

lib/batch-run.lisp

Exported Definitions

batch-run (macro)

Next: , Previous: , Up: Top   [Contents][Index]

## 5 Packages

Packages are listed by definition order.

Next: , Previous: , Up: Packages   [Contents][Index]

### 5.1 open-vrp

Source

packages.lisp (file)

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

### 5.2 open-vrp.test

Source

packages.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

### 5.3 open-vrp.algo

Source

packages.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

### 5.4 open-vrp.util

Source

packages.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

Previous: , Up: Packages   [Contents][Index]

### 5.5 open-vrp.classes

Source

packages.lisp (file)

Use List

common-lisp

Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

## 6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.

Next: , Previous: , Up: Definitions   [Contents][Index]

### 6.1 Exported definitions

Next: , Previous: , Up: Exported definitions   [Contents][Index]

#### 6.1.1 Special variables

Special Variable: *multi-run-start-time*
Package
Source

solver.lisp (file)

Special Variable: *node-coords*
Package
Source

test-cases.lisp (file)

Special Variable: *start-time*
Package
Source

solver.lisp (file)

Special Variable: christofides-1
Package
Source

test-cases.lisp (file)

Special Variable: christofides-2
Package
Source

test-cases.lisp (file)

Special Variable: solomon100
Package
Source

test-cases.lisp (file)

Special Variable: solomon25
Package
Source

test-cases.lisp (file)

Special Variable: test-tsp
Package
Source

test-cases.lisp (file)

Special Variable: test-vrp
Package
Source

test-cases.lisp (file)

Next: , Previous: , Up: Exported definitions   [Contents][Index]

#### 6.1.2 Macros

Macro: aif TEST-FORM THEN-FORM &optional ELSE-FORM
Package
Source

simple-utils.lisp (file)

Macro: awhile EXPR &body BODY
Package
Source

simple-utils.lisp (file)

Macro: batch-run (X DIR-PATH &key PLOTP LOG-MODE) OUTPUT-FILE NUM-TIMES &body ALGO-CALL

Given a directory, will call algo-call on each file that is loaded using the loader-fn and bound to x. Output-file is a mandatory filepath to which the results will be written. Algo-call must return an <Algo> object (e.g. multi-run-algo or solve-prob). Num-times is the number of times the algo-call will run on each test-case, which will be used for stats. Will return a list of list of algo objects holding the solutions.

Example: (batch-run (test-case "test-cases/Solomon-25/")
"run-logs/Solomon-25-batch.txt" 20
(solve-prob test-case (make-instance ’tabu-search :iterations 300))).

Package
Source

batch-run.lisp (file)

Macro: constraints-check ARGLIST INIT-FORMS NEXT-FORMS TESTFORM &optional ENDTEST
Package
Source

constraints.lisp (file)

Macro: create-nodes &key NODE-COORDS DEMANDS TIME-WINDOWS DURATIONS DIST-MATRIX

Will return a vector of nodes that are numbered starting from 0 (which should be the base node, by convention over configuration). All attribute parameters are optional but must be of the same length. Note that dist-matrix parameter is not used, but only to create nodes when no other parameter is passed (called from define-problem).

Package
Source

init-macros.lisp (file)

Macro: create-vehicles FLEET-SIZE BASE-NODE TO-DEPOT &key CAPACITIES SPEEDS

Returns a list of vehicles, starting with ID 0. The starting location of their routes are all initialized at base-node. When to-depot is set to T, initialize their routes with 2 base nodes (departure and destination). For capacities and speeds, only accepts a list that is of equal lenght to fleet-size.

Package
Source

init-macros.lisp (file)

Macro: define-problem NAME FLEET-SIZE &key NODE-COORDS-LIST DEMANDS CAPACITIES TIME-WINDOWS-LIST DURATIONS SPEEDS TO-DEPOT PLOT-FILENAME LOG-FILENAME DIST-MATRIX LOG-MODE PLOTP

Creates the appropriate <Problem> object from the inputs. Extra key attributes only accept lists that are of equal length to node-coords-list or fleet-size (depending on what attributes it sets). For demands, durations, capacities and speeds, will also accept a single value, which will set all attributes to this value.

A(n asymmetric) dist-matrix may be passed, instead of node-coords, in which case plotting will be disabled. dist-matrix must be a list of lists or 2-dimensional array.

With only the demands-list and capacities, creates a CVRP problem. With time-windows, creates a VRPTW problem. When durations and speeds are not provided, defaults to 0 and 1. When plot-filename is not given, it will plot in "plots/name.png". When log-filename is not given, it will log by default in "run-logs/name.txt".

Package
Source

init-macros.lisp (file)

Macro: mac EXPR
Package
Source

simple-utils.lisp (file)

Macro: multi-run TIMES &body ALGO-CALL

Run algo x times and collect all resulting solution objects in a list.

Package
Source

solver.lisp (file)

Macro: multi-run-algo TIMES &body ALGO-CALL

Run algo x times, print multi-run-stats and return the best result.

Package
Source

solver.lisp (file)

Macro: new-node ID XCOR YCOR &key DEMAND START END DURATION
Package
Source

network.lisp (file)

Macro: new-vehicle ID BASE-NODE TO-DEPOT &key CAPACITY SPEED
Package
Source

fleet.lisp (file)

Macro: toggle PLACE
Package
Source

config-functions.lisp (file)

Macro: while TEST &body BODY
Package
Source

simple-utils.lisp (file)

Macro: with-log-or-print (STREAM PROB TIME &optional APPENDP) &body BODY

A wrapper on top of with-open-file, where we use the filepath stored in the :log-file slot of a problem object. When :log-mode is 0, return nil. If 1, use the file stream; if 2, use the T stream. Optional parameter appendp can be set to NIL in order to :supersede if file exists. By default appends. Returns T if logging is succesful. Requires universal-time, to append to log-file.

Package
Source

output.lisp (file)

Macro: with-tabu-indices TABU-INDICES FN ARG-LIST
Package
Source

list.lisp (file)

Next: , Previous: , Up: Exported definitions   [Contents][Index]

#### 6.1.3 Functions

Adds <Move> to tabu-list of <tabu-search>. Calls function held in <ts>’s :tabu-parameter-f slot.

Package
Source

ts-utils.lisp (file)

Add pars to the tabu-list of <tabu-search>. Expects pars to be a list when more than one parameter is recorded. When tabu-list gets larger than the tenure, will prune away the oldest pars on the list. Destructive.

Package
Source

ts-utils.lisp (file)

Function: append-node VEH NODE

Appends <Node> to the end of the route of <vehicle>. Wrapper of insert-node. If the route includes returning to-depot, then append before the last return to depot.

Package
Source

route.lisp (file)

Function: assess-moves SOLUTION MOVES

Given a list of <Move> objects, assess them all on the solution (uses assess-move), and setf the move’s :fitness slots. Returns the list of moves.

Package
Source

iterator.lisp (file)

Function: copy-object OBJECT

A deep-cloner for CLOS.

Package
Source

simple-utils.lisp (file)

Function: create-candidate-list TS SORTED-MOVES

Given a list of sorted moves, return the list with non-tabu improving moves. Will always at least return one (non-tabu) move.

Package
Source

ts-utils.lisp (file)

Function: distance I J DIST-ARRAY

Read from the distance-table with two indices.

Package
Source

network.lisp (file)

Function: drawer-filename INSTANCE
Function: (setf drawer-filename) VALUE INSTANCE
Package
Source

class-definitions.lisp (file)

Function: drawer-legend-x INSTANCE
Function: (setf drawer-legend-x) VALUE INSTANCE
Package
Source

class-definitions.lisp (file)

Function: drawer-legend-y INSTANCE
Function: (setf drawer-legend-y) VALUE INSTANCE
Package
Source

class-definitions.lisp (file)

Function: drawer-legendp INSTANCE
Function: (setf drawer-legendp) VALUE INSTANCE
Package
Source

class-definitions.lisp (file)

Function: drawer-max-coord INSTANCE
Function: (setf drawer-max-coord) VALUE INSTANCE
Package
Source

class-definitions.lisp (file)

Function: drawer-max-pix INSTANCE
Function: (setf drawer-max-pix) VALUE INSTANCE
Package
Source

class-definitions.lisp (file)

Function: drawer-min-coord INSTANCE
Function: (setf drawer-min-coord) VALUE INSTANCE
Package
Source

class-definitions.lisp (file)

Function: drawer-plotp INSTANCE
Function: (setf drawer-plotp) VALUE INSTANCE
Package
Source

class-definitions.lisp (file)

Function: drawer-x-pos INSTANCE
Function: (setf drawer-x-pos) VALUE INSTANCE
Package
Source

class-definitions.lisp (file)

Function: drawer-y-pos INSTANCE
Function: (setf drawer-y-pos) VALUE INSTANCE
Package
Source

class-definitions.lisp (file)

Function: empty-routep ROUTE

Given a route, return T if the route only has base-nodes.

Package
Source

route.lisp (file)

Function: enumerate-interval N

Returns a list from 1 to n.

Package
Source

list.lisp (file)

Function: fitness-before-after SOL OPERATION

Given <Problem> object and an #’operation function that takes the <problem> as input, return the difference of fitness between after and before.

Package
Source

iterator.lisp (file)

Function: generate-dist-array COORD-LIST

Given a list of coord pairs, generate an array of distances.

Package
Source

network.lisp (file)

Function: get-array-row ARRAY ROW-INDEX

Given a 2-dimenstional array and a row-index, return the row as a list

Package
Source

network.lisp (file)

Function: get-best-insertion-move-in-vehicle SOL VEHICLE-ID NODE-ID

Given the <solution> object, vehicle-id and node-id (integers), return the best <insertion-move> (i.e. with the lowest fitness) for inserting node-id in vehicle-id. When no move is feasible, throws error.

Package
Source

best-insertion.lisp (file)

Function: get-best-solution-from-multi-run SOLUTIONS

Given a list of solutions (from multi-run), return the best solution.

Package
Source

solver.lisp (file)

Function: get-busy-vehicles PROBLEM

Returns a list of <Vehicles> that are not empty, given a <Problem> object.

Package
Source

route.lisp (file)

Function: get-closest-node PROB VEH-ID &optional TABU

Returns the closest node from the last location of vehicle. Requires <problem> and vehicle-ID. A tabu list of node-IDs is optional to exclude consideration of some nodes.

Package
Source

tools.lisp (file)

Function: get-closest-vehicle N PROB

Returns the closest <vehicle> to <node>. Used by insertion heuristic. When multiple <vehicle> are on equal distance, choose first one (i.e. lowest ID).

Package
Source

tools.lisp (file)

Function: get-max LIST &key KEY

Gets the maximum value from a list, while ignoring the NIL values.

Package
Source

list.lisp (file)

Function: get-max-index LIST &key KEY

Returns index of the largest value on list, while ignoring NIL. Returns index and its value (closest node and value).

Package
Source

list.lisp (file)

Function: get-min LIST &key KEY

Gets the minimum value from a list, while ignoring the NIL values.

Package
Source

list.lisp (file)

Function: get-min-index LIST &key KEY

Returns index of the smallest value on list, while ignoring NIL. Returns index and its value (closest node and value).

Package
Source

list.lisp (file)

Function: init-algo SOL ALGO

Given a solution, sets the :current-sol, :best-fitness and :best-sol slots of the <algo> object. Returns <algo>.

Package
Source

solver.lisp (file)

Function: insert-at-end OBJECT LIST

Appends the object at the end of the list

Package
Source

list.lisp (file)

Function: insert-before OBJECT INDEX LIST

Insert object before index of list. 0 implies inserting in front, length of list implies appending at the end. Throws index out of bounds when index is larger.

Package
Source

list.lisp (file)

Function: insert-node VEH NODE INDEX

Adds the <Node> object before the index of the route of <vehicle>. An index of 0 implies inserting in front, length of list implies at the end.

Package
Source

route.lisp (file)

Function: is-tabu-movep TS MV

Given a <Move>, checks if the parameters returned by calling :tabu-parameter-f are recorded on the list.

Package
Source

ts-utils.lisp (file)

Function: is-tabup TS PARS

Given pars, checks if on tabu list of <tabu-search>

Package
Source

ts-utils.lisp (file)

Load testcase from file, which should be Solomon style.

Package
Source

Given a file, will recognize the format based on some cues and dispatch to appropriate reader function to parse the file. File with .vrp extension will be read as TSPLIB.

Package
Source

Load a subset of the VRP in the TSPLIB. Do not support time windows. ###################
NAME: xxxx
...
DIMENSION: xxx
...
EDGE_WEIGHT_FORMAT: FUNCTION
...
EDGE_WEIGHT_TYPE: EXACT_2D
CAPACITY: xxx
...
NODE_COORD_SECTION
....
DEPOT_SECTION
1
-1
EOF
####################
EDGE_WEIGHT_FORMAT and EDGE_WEIGHT_TYPE are optional

Package
Source

Function: make-drawer &key (MIN-COORD MIN-COORD) (MAX-COORD MAX-COORD) (X-POS X-POS) (Y-POS Y-POS) (MAX-PIX MAX-PIX) (LEGENDP LEGENDP) (LEGEND-X LEGEND-X) (LEGEND-Y LEGEND-Y) (FILENAME FILENAME) (PLOTP PLOTP)
Package
Source

class-definitions.lisp (file)

Function: make-insertion-move &key (FITNESS FITNESS) (NODE-ID NODE-ID) (VEHICLE-ID VEHICLE-ID) (INDEX INDEX)
Package
Source

tools.lisp (file)

Function: make-node &key (ID ID) (XCOR XCOR) (YCOR YCOR) (DEMAND DEMAND) (START START) (END END) (DURATION DURATION)
Package
Source

class-definitions.lisp (file)

Function: make-ts-best-insertion-move &key (FITNESS FITNESS) (NODE-ID NODE-ID) (VEHICLE-ID VEHICLE-ID) (INDEX INDEX)
Package
Source

ts-classdef.lisp (file)

Function: make-vehicle &key (ID ID) (ROUTE ROUTE) (CAPACITY CAPACITY) (SPEED SPEED)
Package
Source

class-definitions.lisp (file)

Function: map0-n FN N

maps from 0 to n

Package
Source

simple-utils.lisp (file)

Function: map1-n FN N

maps from 1 to n

Package
Source

simple-utils.lisp (file)

Function: max-car LIST

Provided a list, return the maximum value considering the cars

Package
Source

simple-utils.lisp (file)

Function: max-cdr LIST

Provided a list, return the maximum value considering the cdrs

Package
Source

simple-utils.lisp (file)

Function: move-fitness INSTANCE
Function: (setf move-fitness) VALUE INSTANCE
Package
Source

tools.lisp (file)

Function: move-index INSTANCE
Function: (setf move-index) VALUE INSTANCE
Package
Source

tools.lisp (file)

Function: move-node-id INSTANCE
Function: (setf move-node-id) VALUE INSTANCE
Package
Source

tools.lisp (file)

Function: move-vehicle-id INSTANCE
Function: (setf move-vehicle-id) VALUE INSTANCE
Package
Source

tools.lisp (file)

Function: node-demand INSTANCE
Package
Source

class-definitions.lisp (file)

Function: node-distance N1 N2

Given two node objects, calculate and return their distance (Cartesian).

Package
Source

network.lisp (file)

Function: node-duration INSTANCE
Package
Source

class-definitions.lisp (file)

Function: node-end INSTANCE
Package
Source

class-definitions.lisp (file)

Function: node-id INSTANCE
Package
Source

class-definitions.lisp (file)

Function: node-on-routep NODE-ID VEHICLE

Returns NIL of <vehicle> does not have the node on its route.

Package
Source

fleet.lisp (file)

Function: node-start INSTANCE
Package
Source

class-definitions.lisp (file)

Function: node-xcor INSTANCE
Package
Source

class-definitions.lisp (file)

Function: node-ycor INSTANCE
Package
Source

class-definitions.lisp (file)

Function: one-destinationp ROUTE

Return T if there is only one destination on route, excluding base nodes.

Package
Source

route.lisp (file)

Function: print-final-results PROB ALGO &optional STREAM

Prints final results of run, helper function to :after methods of run-algo and solve-prob.

Package
Source

output.lisp (file)

Function: print-multi-run-stats ALGO-OBJECTS &optional STR

Given a list of algo-objects returned by multi-run, print run-stats.

Package
Source

output.lisp (file)

Function: print-timestamp &optional STREAM

Prints timestamp to stream, source from cl-cookbook.

Package
Source

output.lisp (file)

Function: print-vrp-object OBJECT &optional STREAM

Given object, will print it’s object’s slots and values

Package
Source

output.lisp (file)

Function: random-list-permutation LENGTH

Randomly creates a permutation from 1 to length.

Package
Source

list.lisp (file)

Function: remove-index INDEX LIST

Given a list, remove the object on index. Does not accept index out of bounds. Returns the new list AND the object that was removed.

Package
Source

list.lisp (file)

Function: remove-node-at VEH INDEX

Removes the <node> from the route of <vehicle> at index

Package
Source

route.lisp (file)

Function: set-dist-array PROBLEM DIST-ARRAY

Given a <problem> and a 2-dimensional list or array in dist-array, set it in <problem>

Package
Source

config-functions.lisp (file)

Function: set-log-file PROB PATH

Sets the output location of the log-file.

Package
Source

config-functions.lisp (file)

Function: set-log-mode PROB X

Sets log-mode: 0 for no log, 1 for log to log-file, 2 for REPL log.

Package
Source

config-functions.lisp (file)

Function: set-plot-file PROB PATH

Sets the plot output file location.

Package
Source

config-functions.lisp (file)

Function: single LST
Package
Source

simple-utils.lisp (file)

Function: sort-ignore-nil LIST PREDICATE &key KEY

Sorts the sequence with #’< or #’> while passing all NIL values towards the end of result.

Package
Source

list.lisp (file)

Function: sort-moves MOVES

Given a list of <Move>s, sort them according to fitness (ascending). Undestructive.

Package
Source

iterator.lisp (file)

Function: sum LIST

A quick list summer, 4 times as fast as (reduce #’+ list)

Package
Source

simple-utils.lisp (file)

Function: time-after-serving-node NODE ARRIVAL-TIME

Given a node to serve and the current time, return the new time (if on-time to begin with). When arrival-time is too early, wait till earliest start time.

Package
Source

constraints.lisp (file)

Function: toggle-animate ALGO

Toggles animation, which means plotting every iteration in run-frames/ folder

Package
Source

config-functions.lisp (file)

Function: toggle-aspiration TS
Package
Source

ts-utils.lisp (file)

Function: toggle-elite-list TS
Package
Source

ts-utils.lisp (file)

Function: travel-time N1 N2 &key DIST-ARRAY SPEED

Given two <nodes> and optional speed, return the travel-time. When dist-array is not provided, calculate distance directly using coords.

Package
Source

constraints.lisp (file)

Function: veh-in-timep V &optional DIST-ARRAY

Tests weather the route on <Vehicle> is complying with the time-window constraints. Returns T and the time of finishing its last task.

Package
Source

constraints.lisp (file)

Function: vehicle-capacity INSTANCE
Package
Source

class-definitions.lisp (file)

Function: vehicle-id INSTANCE
Package
Source

class-definitions.lisp (file)

Function: vehicle-route INSTANCE
Function: (setf vehicle-route) VALUE INSTANCE
Package
Source

class-definitions.lisp (file)

Function: vehicle-speed INSTANCE
Package
Source

class-definitions.lisp (file)

Function: vehicle-with-node-id PROB NODE-ID

Given a node-ID, return the vehicle-ID that has the node in its route. The function for the input of the base-node 0 is undefined. Returns NIL if node-ID cannot be found.

Package
Source

fleet.lisp (file)

Next: , Previous: , Up: Exported definitions   [Contents][Index]

#### 6.1.4 Generic functions

Generic Function: algo-animatep OBJECT
Generic Function: (setf algo-animatep) NEW-VALUE OBJECT
Package
Methods
Method: algo-animatep (ALGO algo)

Source

class-definitions.lisp (file)

Method: (setf algo-animatep) NEW-VALUE (ALGO algo)

automatically generated writer method

Source

class-definitions.lisp (file)

Generic Function: algo-best-fitness OBJECT
Generic Function: (setf algo-best-fitness) NEW-VALUE OBJECT
Package
Methods
Method: algo-best-fitness (ALGO algo)

Source

class-definitions.lisp (file)

Method: (setf algo-best-fitness) NEW-VALUE (ALGO algo)

automatically generated writer method

Source

class-definitions.lisp (file)

Generic Function: algo-best-iteration OBJECT
Generic Function: (setf algo-best-iteration) NEW-VALUE OBJECT
Package
Methods
Method: algo-best-iteration (ALGO algo)

Source

class-definitions.lisp (file)

Method: (setf algo-best-iteration) NEW-VALUE (ALGO algo)

automatically generated writer method

Source

class-definitions.lisp (file)

Generic Function: algo-best-sol OBJECT
Generic Function: (setf algo-best-sol) NEW-VALUE OBJECT
Package
Methods
Method: algo-best-sol (ALGO algo)

Source

class-definitions.lisp (file)

Method: (setf algo-best-sol) NEW-VALUE (ALGO algo)

automatically generated writer method

Source

class-definitions.lisp (file)

Generic Function: algo-current-sol OBJECT
Generic Function: (setf algo-current-sol) NEW-VALUE OBJECT
Package
Methods
Method: algo-current-sol (ALGO algo)

Source

class-definitions.lisp (file)

Method: (setf algo-current-sol) NEW-VALUE (ALGO algo)

automatically generated writer method

Source

class-definitions.lisp (file)

Generic Function: algo-desc OBJECT
Package
Methods
Method: algo-desc (ALGO algo)

Source

class-definitions.lisp (file)

Generic Function: algo-iterations OBJECT
Generic Function: (setf algo-iterations) NEW-VALUE OBJECT
Package
Methods
Method: algo-iterations (ALGO algo)

Source

class-definitions.lisp (file)

Method: (setf algo-iterations) NEW-VALUE (ALGO algo)

automatically generated writer method

Source

class-definitions.lisp (file)

Generic Function: algo-name OBJECT
Package
Methods
Method: algo-name (ALGO algo)

Source

class-definitions.lisp (file)

Generic Function: assess-move SOL MOVE

The <Move> is assessed by calculating the fitness of solution before, and after. The fitness is the difference and is stored in the :fitness slot of the <Move> object.

Package
Source

iterator.lisp (file)

Methods
Method: assess-move (SOL problem) (MV ts-best-insertion-move)
Source

ts.lisp (file)

Method: assess-move (SOL problem) (M insertion-move)
Source

best-insertion.lisp (file)

Method: assess-move (SOL problem) (M move) around
Method: assess-move (SOL problem) (M move)

Assesses the effect on fitness when <move> is performed on <problem> (on a clone - undestructive).

Method: assess-move SOL MOVE
Generic Function: constraintsp PROB

Tests weather the solution in the <problem> is complying with the constraints. If the problem is a CVRP, check for capacity. If it is a VRPTW, check for time-windows. For CVRPTW, that inherits from both classes, check both constraints.

Package
Source

constraints.lisp (file)

Method Combination

and (short method combination)

Options: :most-specific-first

Methods
Method: constraintsp (SOL vrptw) and
Method: constraintsp (SOL cvrp) and
Method: constraintsp (PROB problem) and
Generic Function: feasible-movep SOL MOVE

Given a current solution, assess feasibility of the <Move>. For CVRP, just check if it fits in the total vehicle capacity. For VRPTW, check for TW feasibility of the whole route. For CVRPTW, checks both by means of multiple-inheritance and method-combination.

Package
Source

tools.lisp (file)

Method Combination

and (short method combination)

Options: :most-specific-first

Methods
Method: feasible-movep (SOL vrptw) (M insertion-move) and
Method: feasible-movep (SOL cvrp) (M insertion-move) and
Method: feasible-movep (SOL problem) (M move) and
Generic Function: fitness PROBLEM

The generic fitness function. To be defined for each class of <problem> specifically. This function allows for custom fitness-functions for your own defined <problem> classess. The default fitness function is total distance.

Package
Source

fitness.lisp (file)

Methods
Method: fitness (PROB problem)
Method: fitness PROBLEM
Generic Function: generate-moves ALGO

Given the algo object, that contains the current solution, generate potential <moves> for next iteration as defined by the algo. e.g. insertion moves for TS and chromosome pool for GA.

Package
Source

iterator.lisp (file)

Methods
Method: generate-moves (TS tabu-search)

Generates a list of <move> instances (depending on what was defined in the ts slot) for all nodes and vehicles.

Source

ts.lisp (file)

Method: generate-moves ALGO
Generic Function: get-best-insertion-move PROB NODE

Given a node and a solution (that does not have this node yet), return the best <insertion-move>.

Package
Source

best-insertion.lisp (file)

Methods
Method: get-best-insertion-move (SOL problem) (N node)
Method: get-best-insertion-move PROB NODE
Generic Function: get-closest-feasible-vehicle N PROB
Package
Methods
Method: get-closest-feasible-vehicle (N node) (PROB vrptw)

Returns the vehicle closest to the node that has enough time at the end of its route. Used for appending nodes. Use get-optimal-insertion instead for inserting feasibly into routes.

Source

tools.lisp (file)

Method: get-closest-feasible-vehicle (N node) (PROB cvrp)

Returns the vehicle closest to the node and has enough capacity.

Source

tools.lisp (file)

Method: get-closest-feasible-vehicle (N node) (PROB problem)
Source

tools.lisp (file)

Generic Function: in-capacityp VEH/CVRP

Tests weather the route on <vehicle> is complying with the capacity constraint. Returns T and the remaining capacity if it does. When <CVRP> is provided, test all vehicles.

Package
Source

constraints.lisp (file)

Methods
Method: in-capacityp (PR cvrp)
Method: in-capacityp (V vehicle)
Method: in-capacityp OBJ
Generic Function: in-timep PR
Package
Methods
Method: in-timep (PR vrptw)
Source

constraints.lisp (file)

Generic Function: initialize PROBLEM ALGO

Initializes the initial solution for the algo object.

Package
Source

iterator.lisp (file)

Methods
Method: initialize (PROB problem) (TS tabu-search)

Creates inital solution and sets it to :algo-current-sol. Returns the <tabu-search> object. For Tabu Search, the default heuristic for generating an initial solution is ’greedy-best-insertion, which is read from the slot :init-heur.

Source

ts.lisp (file)

Method: initialize PROBLEM ALGO
Generic Function: iterate ALGO

Runs the algo one iteration. Implementation of this method should use the algo’s slot current-sol as current solution and destructively adjust it to a new solution. When algo’s slot iterations is 0, then print the best solution found by this algo object. Returns the <algo> object. After each iterate, will automatically check if a new best solution has been found and adjust the :best-sol and :best-fitness slots for you. When :animatep is set to T, will plot current solution in run-frames/

Package
Source

solver.lisp (file)

Methods
Method: iterate (TS tabu-search) around
Source

ts.lisp (file)

Method: iterate (TS tabu-search)
Source

ts.lisp (file)

Method: iterate (A algo) after
Method: iterate (A algo) around
Method: iterate ALGO
Generic Function: iterate-more ALGO INT

When an algo finished (i.e. iterations = 0) using iterate-more allows you to keep running it x more iterations. Also resets :best-iteration, which the stopping condition uses. Calls run-algo on the :current-sol of and with <algo>.

Package
Source

solver.lisp (file)

Methods
Method: iterate-more (A algo) INT after
Method: iterate-more (A algo) INT
Method: iterate-more ALGO INT
Generic Function: last-node VEHICLE

Returns the last <node> in its route. Depicts the current location (before returning to base).

Package
Source

route.lisp (file)

Methods
Method: last-node (V vehicle)
Method: last-node ROUTE
Generic Function: log-to-replp PROB/ALGO

Returns T if :log-mode is set to 2, which is REPL.

Package
Source

output.lisp (file)

Methods
Method: log-to-replp (A algo)
Method: log-to-replp (P problem)
Generic Function: node PROB ID
Package
Methods
Method: node (PROB problem) ID
Source

network.lisp (file)

Generic Function: perform-move SOL MOVE

Performs the move defined in <move> on the solution. Returns the new solution (which is a class of <Problem>)

Package
Source

iterator.lisp (file)

Methods
Method: perform-move (SOL problem) (MV ts-best-insertion-move)

Takes <Node> with node-ID and uses get-best-insertion to insert in vehicle-ID. DESTRUCTIVE.

Source

ts.lisp (file)

Method: perform-move (PROB problem) (MV insertion-move) after
Source

best-insertion.lisp (file)

Method: perform-move (SOL problem) (M insertion-move)

Performs the <move> on <problem>.

Source

best-insertion.lisp (file)

Method: perform-move SOL MOVE
Generic Function: plot-nodes PROBLEM

Draws only the nodes in output file.

Package
Source

draw-solution.lisp (file)

Methods
Method: plot-nodes (PROB problem)
Method: plot-nodes PROBLEM
Generic Function: plot-solution PROBLEM/ALGO &optional OUTPUT-FILE

Given a solution object (<problem>/<algo>), draw the solution in output file given in the drawer object’s :filename slot (which is held in problem-drawer slot). When <algo> object as input, draw the best found solution by that algo object.

Package
Source

draw-solution.lisp (file)

Methods
Method: plot-solution (A algo) &optional OUTPUT-FILE
Method: plot-solution (SOL problem) &optional OUTPUT-FILE
Generic Function: print-routes PROB/ALGO &optional STREAM

Prints solution given a <problem>/<algo> object. Also prints the total distance when the input is a <problem>/<algo> object.

Package
Source

output.lisp (file)

Methods
Method: print-routes (A algo) &optional STREAM
Method: print-routes (PROB problem) &optional STREAM
Generic Function: problem-desc OBJECT
Package
Methods
Method: problem-desc (PROBLEM problem)

Source

class-definitions.lisp (file)

Generic Function: problem-dist-array OBJECT
Generic Function: (setf problem-dist-array) NEW-VALUE OBJECT
Package
Methods
Method: problem-dist-array (PROBLEM problem)

Source

class-definitions.lisp (file)

Method: (setf problem-dist-array) NEW-VALUE (PROBLEM problem)

automatically generated writer method

Source

class-definitions.lisp (file)

Generic Function: problem-drawer OBJECT
Generic Function: (setf problem-drawer) NEW-VALUE OBJECT
Package
Methods
Method: problem-drawer (PROBLEM problem)

Source

class-definitions.lisp (file)

Method: (setf problem-drawer) NEW-VALUE (PROBLEM problem)

automatically generated writer method

Source

class-definitions.lisp (file)

Generic Function: problem-fleet OBJECT
Package
Methods
Method: problem-fleet (PROBLEM problem)

Source

class-definitions.lisp (file)

Generic Function: problem-log-file OBJECT
Generic Function: (setf problem-log-file) NEW-VALUE OBJECT
Package
Methods
Method: problem-log-file (PROBLEM problem)

Source

class-definitions.lisp (file)

Method: (setf problem-log-file) NEW-VALUE (PROBLEM problem)

automatically generated writer method

Source

class-definitions.lisp (file)

Generic Function: problem-log-mode OBJECT
Generic Function: (setf problem-log-mode) NEW-VALUE OBJECT
Package
Methods
Method: problem-log-mode (PROBLEM problem)

Source

class-definitions.lisp (file)

Method: (setf problem-log-mode) NEW-VALUE (PROBLEM problem)

automatically generated writer method

Source

class-definitions.lisp (file)

Generic Function: problem-name OBJECT
Package
Methods
Method: problem-name (PROBLEM problem)

Source

class-definitions.lisp (file)

Generic Function: problem-network OBJECT
Package
Methods
Method: problem-network (PROBLEM problem)

Source

class-definitions.lisp (file)

Generic Function: problem-to-depot OBJECT
Generic Function: (setf problem-to-depot) NEW-VALUE OBJECT
Package
Methods
Method: problem-to-depot (PROBLEM problem)

Source

class-definitions.lisp (file)

Method: (setf problem-to-depot) NEW-VALUE (PROBLEM problem)

automatically generated writer method

Source

class-definitions.lisp (file)

Generic Function: remove-node-id VEH/PROB NODE-ID

Removes the <node> with node-ID from the route of <vehicle>. Returns NIL if failed to find node-ID.

Package
Source

route.lisp (file)

Methods
Method: remove-node-id (PROB problem) NODE-ID
Method: remove-node-id (V vehicle) NODE-ID
Method: remove-node-id VEHICLE NODE-ID
Generic Function: route-indices OBJ

When input is a <vehicle>, returns its route as a list of node IDs. When input is <fleet>/<problem>, list all routes.

Package
Source

fleet.lisp (file)

Methods
Method: route-indices (P problem)
Method: route-indices (V vehicle)
Method: route-indices VEHICLE
Generic Function: run-algo PROBLEM ALGO

Runs the algo on the problem. Destructive - will have side-effects on the <problem> and <algo> objects. Use solve-prob to prevent <problem> object being touched. Will return the <Algo> object, which will contain the solution (in the form of a copy of the <problem> object) in the :best-sol slot. When defining your own algorithms, make sure to implement a run-algo method for your algo, which sets the <algo> slots appropriately, and returns the <algo> object. For algorithms that just build a solution (like greedy-best-insertion or greedy-append), you can use init-algo to set :current-sol, :best-sol, :best-fitness simultaneously. For search algorithms – such as local search, population based algorithms – may make use of the iterate method to automatically set the slots after each iteration.

Package
Source

solver.lisp (file)

Methods
Method: run-algo (PROB problem) (TS tabu-search)

Initialize (if necessary), iterate till finished. Returns <Algo> object.

Source

ts.lisp (file)

Method: run-algo (P problem) (A greedy-best-insertion)

Randomly insert <Nodes> one by one to best <vehicle> in best location. Returns <Algo> object when done.

Source
Method: run-algo (P problem) (A greedy-append)

Randomly append <Nodes> one by one to the closest <Vehicle>. Returns <Algo> object when done. Also prints the fitness and solution.

Source

greedy-append.lisp (file)

Method: run-algo (P problem) (A greedy-nn)

While there exists unchosen nodes, keep appending it. Returns the <Algo> object when done. Also prints the fitness and solution (run-algo :after method).

Source

greedy-nn.lisp (file)

Method: run-algo (P problem) (A algo) after
Method: run-algo (P problem) (A algo) around
Method: run-algo PROBLEM ALGO
Generic Function: select-move ALGO MOVES

Given an <Algo> object and the list of <Moves>, select a move. By default, sort the moves and select the best one, but e.g. for tabu-search, check first of the <Move> is tabu.

Package
Source

iterator.lisp (file)

Methods
Method: select-move (TS tabu-search) ALL-MOVES

This function selects best non-tabu move from a list of assessed moves. When aspiration criteria is set to T, then if by performing the move we get a new best solution, circumvent the tabu-list.

Source

ts.lisp (file)

Method: select-move (A algo) MOVES
Method: select-move ALGO MOVES
Generic Function: solve-prob PROBLEM ALGO

Solves the problem with the algo. Uses run-algo, but leaves the <problem> object untouched (<Algo> will suffer side-effects). Works with a clone (copy-object in lib/simple-utils.lisp). NON-destructive wrapper to the run-algo method.

Package
Source

solver.lisp (file)

Methods
Method: solve-prob (P problem) (A algo) after
Method: solve-prob (P problem) (A algo) before
Method: solve-prob (PROBLEM problem) (ALGO algo)
Method: solve-prob PROBLEM ALGO
Generic Function: tabu-list CONDITION
Package
Methods
Method: tabu-list (CONDITION all-moves-tabu)
Source

algo-conditions.lisp (file)

Generic Function: toggle-legend PROBLEM/ALGO

Toggles legend drawing. When <Algo> is provided, toggles :best-sol

Package
Source

config-functions.lisp (file)

Methods
Method: toggle-legend (A algo)
Method: toggle-legend (PR problem)
Generic Function: toggle-plot PROBLEM/ALGO

Toggles plotting on/off of best solution. Config boolean is held by <Drawer> object’s plotp slot.

Package
Source

config-functions.lisp (file)

Methods
Method: toggle-plot (A algo)
Method: toggle-plot (PR problem)
Generic Function: total-dist VEH/PROB DIST-ARRAY

Returns total distance of the route(s) given a vehicle or a fleet.

Package
Source

fleet.lisp (file)

Methods
Method: total-dist (P problem) DIST-ARRAY
Method: total-dist (V vehicle) DIST-ARRAY
Method: total-dist VEH/PROB DIST-ARRAY
Generic Function: ts-aspirationp OBJECT
Generic Function: (setf ts-aspirationp) NEW-VALUE OBJECT
Package
Methods
Method: ts-aspirationp (TABU-SEARCH tabu-search)

Source

ts-classdef.lisp (file)

Method: (setf ts-aspirationp) NEW-VALUE (TABU-SEARCH tabu-search)

automatically generated writer method

Source

ts-classdef.lisp (file)

Generic Function: ts-candidate-list OBJECT
Generic Function: (setf ts-candidate-list) NEW-VALUE OBJECT
Package
Methods
Method: ts-candidate-list (TABU-SEARCH tabu-search)

Source

ts-classdef.lisp (file)

Method: (setf ts-candidate-list) NEW-VALUE (TABU-SEARCH tabu-search)

automatically generated writer method

Source

ts-classdef.lisp (file)

Generic Function: ts-elite-listp OBJECT
Generic Function: (setf ts-elite-listp) NEW-VALUE OBJECT
Package
Methods
Method: ts-elite-listp (TABU-SEARCH tabu-search)

Source

ts-classdef.lisp (file)

Method: (setf ts-elite-listp) NEW-VALUE (TABU-SEARCH tabu-search)

automatically generated writer method

Source

ts-classdef.lisp (file)

Generic Function: ts-init-heur OBJECT
Generic Function: (setf ts-init-heur) NEW-VALUE OBJECT
Package
Methods
Method: ts-init-heur (TABU-SEARCH tabu-search)

Source

ts-classdef.lisp (file)

Method: (setf ts-init-heur) NEW-VALUE (TABU-SEARCH tabu-search)

automatically generated writer method

Source

ts-classdef.lisp (file)

Generic Function: ts-move-type OBJECT
Generic Function: (setf ts-move-type) NEW-VALUE OBJECT
Package
Methods
Method: ts-move-type (TABU-SEARCH tabu-search)

Source

ts-classdef.lisp (file)

Method: (setf ts-move-type) NEW-VALUE (TABU-SEARCH tabu-search)

automatically generated writer method

Source

ts-classdef.lisp (file)

Generic Function: ts-parameter-f OBJECT
Generic Function: (setf ts-parameter-f) NEW-VALUE OBJECT
Package
Methods
Method: ts-parameter-f (TABU-SEARCH tabu-search)

Source

ts-classdef.lisp (file)

Method: (setf ts-parameter-f) NEW-VALUE (TABU-SEARCH tabu-search)

automatically generated writer method

Source

ts-classdef.lisp (file)

Generic Function: ts-stopping-condition OBJECT
Generic Function: (setf ts-stopping-condition) NEW-VALUE OBJECT
Package
Methods
Method: ts-stopping-condition (TABU-SEARCH tabu-search)

Source

ts-classdef.lisp (file)

Method: (setf ts-stopping-condition) NEW-VALUE (TABU-SEARCH tabu-search)

automatically generated writer method

Source

ts-classdef.lisp (file)

Generic Function: ts-tabu-list OBJECT
Generic Function: (setf ts-tabu-list) NEW-VALUE OBJECT
Package
Methods
Method: ts-tabu-list (TABU-SEARCH tabu-search)

Source

ts-classdef.lisp (file)

Method: (setf ts-tabu-list) NEW-VALUE (TABU-SEARCH tabu-search)

automatically generated writer method

Source

ts-classdef.lisp (file)

Generic Function: ts-tenure OBJECT
Generic Function: (setf ts-tenure) NEW-VALUE OBJECT
Package
Methods
Method: ts-tenure (TABU-SEARCH tabu-search)

Source

ts-classdef.lisp (file)

Method: (setf ts-tenure) NEW-VALUE (TABU-SEARCH tabu-search)

automatically generated writer method

Source

ts-classdef.lisp (file)

Generic Function: vehicle P ID
Package
Methods
Method: vehicle (P problem) ID
Source

fleet.lisp (file)

Next: , Previous: , Up: Exported definitions   [Contents][Index]

#### 6.1.5 Conditions

Condition: list-of-nils ()
Package
Source

conditions.lisp (file)

Direct superclasses

error (condition)

Direct methods
• key (method)
• ls (method)
Direct slots
Slot: ls
Initargs

:ls

ls (generic function)

Slot: key
Initargs

:key

key (generic function)

Condition: same-origin-destination ()
Package
Source

conditions.lisp (file)

Direct superclasses

error (condition)

Direct methods
Direct slots
Slot: from
Initargs

:from

from (generic function)

Slot: to
Initargs

:to

to (generic function)

Next: , Previous: , Up: Exported definitions   [Contents][Index]

#### 6.1.6 Structures

Structure: drawer ()
Package
Source

class-definitions.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: min-coord

drawer-min-coord (function)

Writers

(setf drawer-min-coord) (function)

Slot: max-coord

drawer-max-coord (function)

Writers

(setf drawer-max-coord) (function)

Slot: x-pos
Initform

0

drawer-x-pos (function)

Writers

(setf drawer-x-pos) (function)

Slot: y-pos
Initform

0

drawer-y-pos (function)

Writers

(setf drawer-y-pos) (function)

Slot: max-pix
Initform

1000

drawer-max-pix (function)

Writers

(setf drawer-max-pix) (function)

Slot: legendp
Initform

t

drawer-legendp (function)

Writers

(setf drawer-legendp) (function)

Slot: legend-x
Initform

100

drawer-legend-x (function)

Writers

(setf drawer-legend-x) (function)

Slot: legend-y
Initform

900

drawer-legend-y (function)

Writers

(setf drawer-legend-y) (function)

Slot: filename

drawer-filename (function)

Writers

(setf drawer-filename) (function)

Slot: plotp

drawer-plotp (function)

Writers

(setf drawer-plotp) (function)

Structure: insertion-move ()
Package
Source

tools.lisp (file)

Direct superclasses

move (structure)

Direct subclasses

ts-best-insertion-move (structure)

Direct methods
Direct slots
Slot: node-id

move-node-id (function)

Writers

(setf move-node-id) (function)

Slot: vehicle-id

move-vehicle-id (function)

Writers

(setf move-vehicle-id) (function)

Slot: index

move-index (function)

Writers

(setf move-index) (function)

Structure: move ()
Package
Source

tools.lisp (file)

Direct superclasses

structure-object (structure)

Direct subclasses

insertion-move (structure)

Direct methods
Direct slots
Slot: fitness

move-fitness (function)

Writers

(setf move-fitness) (function)

Structure: node ()
Package
Source

class-definitions.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: id
Type

fixnum

Initform

0

node-id (function)

Writers

(setf node-id) (function)

Slot: xcor
Initform

0

node-xcor (function)

Writers

(setf node-xcor) (function)

Slot: ycor
Initform

0

node-ycor (function)

Writers

(setf node-ycor) (function)

Slot: demand
Type

fixnum

Initform

0

node-demand (function)

Writers

(setf node-demand) (function)

Slot: start
Type

fixnum

Initform

0

node-start (function)

Writers

(setf node-start) (function)

Slot: end
Type

fixnum

Initform

0

node-end (function)

Writers

(setf node-end) (function)

Slot: duration
Type

fixnum

Initform

0

node-duration (function)

Writers

(setf node-duration) (function)

Structure: ts-best-insertion-move ()
Package
Source

ts-classdef.lisp (file)

Direct superclasses

insertion-move (structure)

Direct methods
Structure: vehicle ()
Package
Source

class-definitions.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: id
Type

fixnum

Initform

0

vehicle-id (function)

Writers

(setf vehicle-id) (function)

Slot: route

vehicle-route (function)

Writers

(setf vehicle-route) (function)

Slot: capacity
Type

fixnum

Initform

0

vehicle-capacity (function)

Writers

(setf vehicle-capacity) (function)

Slot: speed
Initform

1

vehicle-speed (function)

Writers

(setf vehicle-speed) (function)

Previous: , Up: Exported definitions   [Contents][Index]

#### 6.1.7 Classes

Class: algo ()
Package
Source

class-definitions.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: name
Initargs

:name

algo-name (generic function)

Slot: desc
Allocation

:class

Initargs

:desc

algo-desc (generic function)

Slot: best-sol
Initargs

:best-sol

algo-best-sol (generic function)

Writers

(setf algo-best-sol) (generic function)

Slot: best-fitness
Initargs

:best-fitness

algo-best-fitness (generic function)

Writers

(setf algo-best-fitness) (generic function)

Slot: best-iteration
Initform

0

algo-best-iteration (generic function)

Writers

(setf algo-best-iteration) (generic function)

Slot: current-sol
Initargs

:current-sol

algo-current-sol (generic function)

Writers

(setf algo-current-sol) (generic function)

Slot: iterations
Initargs

:iterations

algo-iterations (generic function)

Writers

(setf algo-iterations) (generic function)

Slot: animatep
Initargs

:animatep

algo-animatep (generic function)

Writers

(setf algo-animatep) (generic function)

Class: cvrp ()
Package
Source

class-definitions.lisp (file)

Direct superclasses

problem (class)

Direct subclasses

cvrptw (class)

Direct methods
Direct slots
Slot: name
Initform

"cvrp"

Slot: desc
Initform

"capacitated vehicle routing problem"

Class: cvrptw ()
Package
Source

class-definitions.lisp (file)

Direct superclasses
Direct slots
Slot: name
Initform

"cvrptw"

Slot: desc
Initform

"capacitated vehicle routing problem with time windows"

Class: greedy-append ()
Package
Source

greedy-append.lisp (file)

Direct superclasses

algo (class)

Direct methods

run-algo (method)

Direct slots
Slot: name
Initform

"greedy appending heuristic"

Slot: desc
Initform

"random greedy insertion heuristic; append nodes to closest vehicle successively. used as initial solution for search algos."

Class: greedy-best-insertion ()
Package
Source
Direct superclasses

algo (class)

Direct methods

run-algo (method)

Direct slots
Slot: name
Initform

"greedy best insertion heuristic"

Slot: desc
Initform

"randomly insert nodes one by one to best vehicle at best location. used as initial solution for search algos."

Class: greedy-nn ()
Package
Source

greedy-nn.lisp (file)

Direct superclasses

algo (class)

Direct methods

run-algo (method)

Direct slots
Slot: name
Initform

"greedy nn-algo"

Slot: desc
Initform

"nearest neighborhood algo; from base/random, select next closest one"

Class: problem ()
Package
Source

class-definitions.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: name
Initargs

:name

Initform

"vrp"

problem-name (generic function)

Slot: desc
Allocation

:class

Initargs

:desc

Initform

"vehicle routing problem"

problem-desc (generic function)

Slot: network
Initargs

:network

problem-network (generic function)

Slot: dist-array
Initargs

:dist-array

problem-dist-array (generic function)

Writers

(setf problem-dist-array) (generic function)

Slot: fleet
Initargs

:fleet

problem-fleet (generic function)

Slot: to-depot
Initargs

:to-depot

Initform

t

problem-to-depot (generic function)

Writers

(setf problem-to-depot) (generic function)

Slot: drawer
Initargs

:drawer

problem-drawer (generic function)

Writers

(setf problem-drawer) (generic function)

Slot: log-file
Initargs

:log-file

problem-log-file (generic function)

Writers

(setf problem-log-file) (generic function)

Slot: log-mode
Initargs

:log-mode

Initform

1

problem-log-mode (generic function)

Writers

(setf problem-log-mode) (generic function)

Class: tabu-search ()
Package
Source

ts-classdef.lisp (file)

Direct superclasses

algo (class)

Direct methods
Direct slots
Slot: name
Initform

"tabu search"

Slot: desc
Initform

"a local search that escapes local optima by means of declaring certain moves tabu."

Slot: move-type
Initargs

:move-type

Initform

(quote open-vrp.algo:ts-best-insertion-move)

ts-move-type (generic function)

Writers

(setf ts-move-type) (generic function)

Slot: init-heur
Initargs

:init-heur

Initform

(quote open-vrp.algo:greedy-best-insertion)

ts-init-heur (generic function)

Writers

(setf ts-init-heur) (generic function)

Slot: iterations
Initform

20

Slot: aspirationp
Initargs

:aspirationp

Initform

t

ts-aspirationp (generic function)

Writers

(setf ts-aspirationp) (generic function)

Slot: elite-listp
Initargs

:elite-listp

Initform

t

ts-elite-listp (generic function)

Writers

(setf ts-elite-listp) (generic function)

Slot: tabu-list
Initargs

:tabu-list

ts-tabu-list (generic function)

Writers

(setf ts-tabu-list) (generic function)

Slot: tabu-tenure
Initargs

:tabu-tenure

Initform

15

ts-tenure (generic function)

Writers

(setf ts-tenure) (generic function)

Slot: tabu-parameter-f
Initargs

:tabu-parameter-f

Initform

(function open-vrp.algo::ts-pars-n)

ts-parameter-f (generic function)

Writers

(setf ts-parameter-f) (generic function)

Slot: candidate-list
Initargs

:candidate-list

ts-candidate-list (generic function)

Writers

(setf ts-candidate-list) (generic function)

Slot: stopping-condition
Initargs

:stopping-condition

Initform

(function open-vrp.algo::stopping-conditionp)

ts-stopping-condition (generic function)

Writers

(setf ts-stopping-condition) (generic function)

Class: vrptw ()
Package
Source

class-definitions.lisp (file)

Direct superclasses

problem (class)

Direct subclasses

cvrptw (class)

Direct methods
Direct slots
Slot: name
Initform

"vrptw"

Slot: desc
Initform

"vehicle routing problem with time windows"

Previous: , Up: Definitions   [Contents][Index]

### 6.2 Internal definitions

Next: , Previous: , Up: Internal definitions   [Contents][Index]

#### 6.2.1 Special variables

Special Variable: *b*
Package
Source

draw-solution.lisp (file)

Special Variable: *finish-time*
Package
Source

solver.lisp (file)

Special Variable: *g*
Package
Source

draw-solution.lisp (file)

Special Variable: *multi-run-finish-time*
Package
Source

solver.lisp (file)

Special Variable: *r*
Package
Source

draw-solution.lisp (file)

Special Variable: asym-net
Package
Source

test-suite.lisp (file)

Special Variable: asym-tsp
Package
Source

test-suite.lisp (file)

Special Variable: asym-vrp
Package
Source

test-suite.lisp (file)

Next: , Previous: , Up: Internal definitions   [Contents][Index]

#### 6.2.2 Macros

Macro: change-route VEHICLE &body BODY

Expands into binding the vehicles route to r and setting it to result of body.

Package
Source

route.lisp (file)

Macro: for-node-id (NODE-ID PROB) &body BODY

Map over all node-IDs, except for base.

Package
Source

ts.lisp (file)

Macro: for-veh-id (VEH-ID PROB) &body BODY

Map over all veh-IDs capped at fleet-size. Will consider only busy vehicles and one extra idle vehicle.

Package
Source

ts.lisp (file)

Macro: on-all-testcases ALGO-SYMBOL
Package
Source

test-suite.lisp (file)

Macro: use-node DRAWER NODE &body BODY
Package
Source

draw-solution.lisp (file)

Next: , Previous: , Up: Internal definitions   [Contents][Index]

#### 6.2.3 Functions

Package
Source

Function: 2d-array-to-list ARRAY

Given a 2-dimensional array, return a list of lists.

Package
Source

network.lisp (file)

Function: 2d-list-to-array MATRIX

Given a list of lists, return a 2-dimensional array.

Package
Source

network.lisp (file)

Function: append-run-result FILEPATH RESULTS

Given the output filepath (with table headers initialized) and a list of algo-objects (as returned by multi-run), append one line that summarizes the run (by calling get-multi-run-stats).

Package
Source

output.lisp (file)

Function: arrow-to DRAWER PIX-X PIX-Y SIZE SKEW

Draws an arrow as in line-to, but creates an arrow in the middle of size. Use with canvas!

Package
Source

draw-solution.lisp (file)

Function: capacities-left PROB

Returns a list of all capacities left on the vehicles given the present solution.

Package
Source

tools.lisp (file)

Function: clear-tabu-list TS

Given a <tabu-search>, erase everything that is on the tabu-list. A useful restart in case all moves were declared tabu.

Package
Source

ts-utils.lisp (file)

Function: coord->pix DRAWER X

Given a drawer and a coord, calculate the associated x/y pixel. Includes 1 coord as border.

Package
Source

draw-solution.lisp (file)

Function: copy-drawer INSTANCE
Package
Source

class-definitions.lisp (file)

Function: copy-insertion-move INSTANCE
Package
Source

tools.lisp (file)

Function: copy-move INSTANCE
Package
Source

tools.lisp (file)

Function: copy-node INSTANCE
Package
Source

class-definitions.lisp (file)

Function: copy-ts-best-insertion-move INSTANCE
Package
Source

ts-classdef.lisp (file)

Function: copy-vehicle INSTANCE
Package
Source

class-definitions.lisp (file)

Function: couple-lists LIST1 LIST2

Given a list of x and y-coords, return a list of pairs usable. Used for node-coords or time-windows.

Package
Source

Function: distance-coord-pair N1 N2

Calculates distance given two coord pairs. Returns NIL if both coords are the same.

Package
Source

network.lisp (file)

Function: distance-coords X1 Y1 X2 Y2

Calculates pythagoras distance

Package
Source

network.lisp (file)

Function: dists-to-vehicles NODE PROB

Given a <Node> and a <Problem>, return the list of all the distances from the <Node> to the current positions of the fleet. Used by get-closest-(feasible)-vehicle.

Package
Source

tools.lisp (file)

Function: draw-legend-item DRAWER VEH-OBJ R G B
Package
Source

draw-solution.lisp (file)

Function: draw-nodes PROB

Given the <Problem> object, plot the nodes only. Usage only with-canvas!

Package
Source

draw-solution.lisp (file)

Function: drawer-p OBJECT
Package
Source

class-definitions.lisp (file)

Function: generate-insertion-moves SOL VEHICLE-ID NODE-ID

Given the <solution> object, vehicle-id and node-id (integers), create all possible insertion-moves, and return them in a list. Avoid generating moves that won’t do anything (when doing intra-route insertion).

Package
Source

best-insertion.lisp (file)

Function: get-color ()

Returns next color. Deterministically random.

Package
Source

draw-solution.lisp (file)

Function: get-from-list LIST PRED &key KEY

Gets from list the value (max or min) while ignoring NIL’s. Returns NIL if the whole list is nil. Use get-min or get-max!

Package
Source

list.lisp (file)

Function: get-index-of LIST FN &key KEY

Helper function of the below. Use get-min-index or get-max-index!

Package
Source

list.lisp (file)

Function: get-max-coord NODE-COORDS
Package
Source

init-macros.lisp (file)

Function: get-min-coord NODE-COORDS
Package
Source

init-macros.lisp (file)

Function: get-min-index-with-tabu DISTANCES TABU

Returns index of the first next closest, that is not in chosen (which is a list).

Package
Source

tools.lisp (file)

Function: get-multi-run-stats ALGO-OBJECTS

Given a list of algo-objects, as returned by multi-run, return the stats with (values min max avg std runs time time/run)

Package
Source

output.lisp (file)

Function: improving-movep MOVE

Returns T if move is an improving one, i.e. has a negative fitness.

Package
Source

ts-utils.lisp (file)

Function: insert-time-stamp-in-path PATH TIME

Given path, return the string of the path with the timestamp inserted before the .xxx

Package
Source

output.lisp (file)

Function: insertion-move-p OBJECT
Package
Source

tools.lisp (file)

Function: late-v-duration ()
Package
Source

test-suite.lisp (file)

Function: late-v-speed ()
Package
Source

test-suite.lisp (file)

Function: make-move &key (FITNESS FITNESS)
Package
Source

tools.lisp (file)

Function: mark-nill LIST INDICES

Marks the indices on list with NIL. DESTRUCTIVE.

Package
Source

list.lisp (file)

Function: move-p OBJECT
Package
Source

tools.lisp (file)

Function: node-p OBJECT
Package
Source

class-definitions.lisp (file)

Function: num-nodes PROB

Given a problem, return the number of nodes in the network.

Package
Source

tools.lisp (file)

Function: num-veh PROB

Given a problem, return size of the fleet.

Package
Source

tools.lisp (file)

Function: on-time-and-in-cap-v ()
Package
Source

test-suite.lisp (file)

Function: on-time-but-overfull-v ()
Package
Source

test-suite.lisp (file)

Function: on-time-v ()
Package
Source

test-suite.lisp (file)

Function: overfull-v ()
Package
Source

test-suite.lisp (file)

Package
Source

output.lisp (file)

Function: print-header PROB ALGO &optional STREAM

Given a <Problem> and <Algo> object, print out a short description for the objects, and a line that logs the time of start of solving

Package
Source

output.lisp (file)

Package
Source

Package
Source

Function: route-from INS-MOVE SOL

Returns the route that contains the node that will be moved.

Package
Source

tools.lisp (file)

Function: route-to INS-MOVE SOL

Returns the route that will be affected by the insertion-move.

Package
Source

tools.lisp (file)

Function: same-lengthp &rest LISTS

Returns NIL if lists are not of equal length. Returns their length if all are equal. Accepts NIL arguments or single numbers, which will be ignored. Also accepts 2-dimensional arrays.

Package
Source

init-macros.lisp (file)

Function: select-best-tabu C
Package
Source

algo-conditions.lisp (file)

Function: space-v ()
Package
Source

test-suite.lisp (file)

Function: stopping-conditionp TS

Given a <tabu-search>, tests whether the number of iterations since the best solution was found is larger than triple tenure value. This is an indicator of cycling behaviour. Minimum 20 iterations in case tenure is smaller than 10. Usefull for many multi-runs.

Package
Source

ts-utils.lisp (file)

Function: store-pix DRAWER PIX-X PIX-Y

Store the position of the path (helper function for arrow calculation).

Package
Source

draw-solution.lisp (file)

Function: times-of-arriving NODE PROB

Returns a list of arrival times of the vehicles to node given the present solution.

Package
Source

tools.lisp (file)

Function: ts-best-insertion-move-fitness INSTANCE
Function: (setf ts-best-insertion-move-fitness) VALUE INSTANCE
Package
Source

ts-classdef.lisp (file)

Function: ts-best-insertion-move-index INSTANCE
Function: (setf ts-best-insertion-move-index) VALUE INSTANCE
Package
Source

ts-classdef.lisp (file)

Function: ts-best-insertion-move-node-id INSTANCE
Function: (setf ts-best-insertion-move-node-id) VALUE INSTANCE
Package
Source

ts-classdef.lisp (file)

Function: ts-best-insertion-move-p OBJECT
Package
Source

ts-classdef.lisp (file)

Function: ts-best-insertion-move-vehicle-id INSTANCE
Function: (setf ts-best-insertion-move-vehicle-id) VALUE INSTANCE
Package
Source

ts-classdef.lisp (file)

Function: ts-pars-n MV
Package
Source

ts-utils.lisp (file)

Function: ts-pars-nv MV
Package
Source

ts-utils.lisp (file)

Function: universal-time-to-string &optional TIME

Returns yymmdd-hhmmss in a string. Used for timestamped log-files.

Package
Source

output.lisp (file)

Function: useless-move MV PROB

Returns T if move is useless. Two options: 1. move concerns node and vehicle that has the node as it’s only destination, e.g. (0 2 0). 2. Moving node from one-destination vehicle to empty-vehicle, which becomes another one-destination vehicle.

Package
Source

ts.lisp (file)

Function: vehicle-p OBJECT
Package
Source

class-definitions.lisp (file)

Function: vrp-object OBJECT

Tests if the object is an instance of a VRP object that needs deep copy. (problem, fleet, vehicle)

Package
Source

simple-utils.lisp (file)

Next: , Previous: , Up: Internal definitions   [Contents][Index]

#### 6.2.4 Generic functions

Generic Function: from CONDITION
Package
Methods
Method: from (CONDITION same-origin-destination)
Source

conditions.lisp (file)

Generic Function: func CONDITION
Package
Methods
Method: func (CONDITION infeasible-solution)
Source

conditions.lisp (file)

Generic Function: index CONDITION
Package
Methods
Method: index (CONDITION index-out-of-bounds)
Source

conditions.lisp (file)

Generic Function: key CONDITION
Package
Methods
Method: key (CONDITION list-of-nils)
Source

conditions.lisp (file)

Generic Function: lists CONDITION
Package
Methods
Method: lists (CONDITION not-equal-length)
Source

conditions.lisp (file)

Generic Function: ls CONDITION
Package
Methods
Method: ls (CONDITION list-of-nils)
Source

conditions.lisp (file)

Method: ls (CONDITION index-out-of-bounds)
Source

conditions.lisp (file)

Generic Function: moves CONDITION
Package
Methods
Method: moves (CONDITION no-feasible-move)
Source

algo-conditions.lisp (file)

Method: moves (CONDITION all-moves-tabu)
Source

algo-conditions.lisp (file)

Generic Function: pred CONDITION
Package
Methods
Method: pred (CONDITION unaccepted-predicate)
Source

conditions.lisp (file)

Generic Function: prob CONDITION
Package
Methods
Method: prob (CONDITION missing-drawer-object)
Source

conditions.lisp (file)

Generic Function: remove-affected-moves TS MOVE
Package
Methods
Method: remove-affected-moves (TS tabu-search) MOVE

Given a <Tabu-search> and one <Move> (to be performed), remove all the moves from the candidate-list that do not apply anymore after the selected move is performed.

Source

ts-utils.lisp (file)

Generic Function: sol CONDITION
Package
Methods
Method: sol (CONDITION infeasible-solution)
Source

conditions.lisp (file)

Generic Function: to CONDITION
Package
Methods
Method: to (CONDITION same-origin-destination)
Source

conditions.lisp (file)

Generic Function: veh CONDITION
Package
Methods
Method: veh (CONDITION no-speed-vehicle)
Source

conditions.lisp (file)

Method: veh (CONDITION no-capacities-vehicle)
Source

conditions.lisp (file)

Previous: , Up: Internal definitions   [Contents][Index]

#### 6.2.5 Conditions

Condition: all-moves-tabu ()
Package
Source

algo-conditions.lisp (file)

Direct superclasses

error (condition)

Direct methods
Direct slots
Slot: moves
Initargs

:moves

moves (generic function)

Slot: tabu-list
Initargs

:tabu-list

tabu-list (generic function)

Condition: empty-network ()
Package
Source

conditions.lisp (file)

Direct superclasses

error (condition)

Condition: file-not-recognized ()
Package
Source

conditions.lisp (file)

Direct superclasses

error (condition)

Direct methods

file (method)

Direct slots
Slot: file
Initargs

:file

file (generic function)

Condition: index-out-of-bounds ()
Package
Source

conditions.lisp (file)

Direct superclasses

error (condition)

Direct methods
Direct slots
Slot: index
Initargs

:index

index (generic function)

Slot: ls
Initargs

:ls

ls (generic function)

Condition: infeasible-solution ()
Package
Source

conditions.lisp (file)

Direct superclasses

error (condition)

Direct methods
Direct slots
Slot: sol
Initargs

:sol

sol (generic function)

Slot: func
Initargs

:func

func (generic function)

Condition: missing-drawer-object ()
Package
Source

conditions.lisp (file)

Direct superclasses

error (condition)

Direct methods

prob (method)

Direct slots
Slot: prob
Initargs

:prob

prob (generic function)

Condition: no-capacities-vehicle ()
Package
Source

conditions.lisp (file)

Direct superclasses

error (condition)

Direct methods

veh (method)

Direct slots
Slot: veh
Initargs

:veh

veh (generic function)

Condition: no-feasible-move ()
Package
Source

algo-conditions.lisp (file)

Direct superclasses

error (condition)

Direct methods

moves (method)

Direct slots
Slot: moves
Initargs

:moves

moves (generic function)

Condition: no-initial-feasible-solution ()
Package
Source

algo-conditions.lisp (file)

Direct superclasses

error (condition)

Condition: no-speed-vehicle ()
Package
Source

conditions.lisp (file)

Direct superclasses

error (condition)

Direct methods

veh (method)

Direct slots
Slot: veh
Initargs

:veh

veh (generic function)

Condition: not-equal-length ()
Package
Source

conditions.lisp (file)

Direct superclasses

error (condition)

Direct methods

lists (method)

Direct slots
Slot: lists
Initargs

:lists

lists (generic function)

Condition: unaccepted-predicate ()
Package
Source

conditions.lisp (file)

Direct superclasses

error (condition)

Direct methods

pred (method)

Direct slots
Slot: pred
Initargs

:pred

pred (generic function)

Previous: , Up: Top   [Contents][Index]

## Appendix A Indexes

Next: , Previous: , Up: Indexes   [Contents][Index]

### A.1 Concepts

Next: , Previous: , Up: Indexes   [Contents][Index]

### A.2 Functions

Jump to: %   (   2   A   B   C   D   E   F   G   I   K   L   M   N   O   P   R   S   T   U   V   W
Jump to: %   (   2   A   B   C   D   E   F   G   I   K   L   M   N   O   P   R   S   T   U   V   W

Next: , Previous: , Up: Indexes   [Contents][Index]

### A.3 Variables

Jump to: *   A   B   C   D   E   F   I   K   L   M   N   P   R   S   T   V   X   Y
Jump to: *   A   B   C   D   E   F   I   K   L   M   N   P   R   S   T   V   X   Y

Previous: , Up: Indexes   [Contents][Index]

### A.4 Data types

Jump to: A   C   D   E   F   G   I   L   M   N   O   P   S   T   U   V
Jump to: A   C   D   E   F   G   I   L   M   N   O   P   S   T   U   V