# Problem Definition (Planning with Transfer)
goal: get back to the **essence**.
What is the **strict minimal** information to define the problem such that the problem still makes sense?
## System Model
* define the world
* map / environment
* graph, intersections (vertices), lanes (path of vertices),...
* vehicle
* current location
* capacity (#passengers)
* ability to move
* passenger
* current location
* movement
* of vehicles?
* of passengers?
* "carrying"
* from passenger location + movement + vehicle capacity
## "consequences"
Here comes anything that you can obtain from the system definition (deduction, composition, etc...).
* route
* comes from the definition of movements
* transfer (where to put it?)
* comes from movement
> Warning: you cannot include here anything that relies on / specific to the problem.
## Problem Definition (Specification)
Define here everything **specific** to the problem.
Definition:
* primitives:
* move (vehicle)
* transfer (of load):
* (receiver, sender) @ (location, time)
* constraints:
* receiver, sender @ (location, time)
* load \in sender before (not in receiver)
* load \in receiver after (not in sender)
* (before) free space in receiver >= load
* agents:
* vehicles (mobible, receive/send load)
* source (fixed location, generate load)
* sink (fixed location, consumes load)
* pickup/delivery
* requires: notion of pickup location / delivery location
* schedule
* what is it? (attributes)
* constraints?
* ...
> Problem: (inputs) |-> outputs subject to (validity requirements)
* validity requirements: Boolean functions
* validity(world, input, output) -> Boolean
* A solution S to the problem P is correct iff:
* for all time, for all valid inputs, in every environment, in every executions:
* with all possible outputs of S(env, input) -> output
* all validity conditions are true.
* safety properties
* liveness properties
## Example
### Sorting Problem
* INPUTs
* array a = [a_1, ...a_n]
* comparison function/operation/relation <
* OUTPUT
* array b = [b_1, ..., b_n]
* CONDITIONS
* b is a permutation of a
* for all i in 1..n-1: b_{i} < b_{i+1}
## Note
### (in thesis / papers / reports / presentations)
If problem P is purpose of research => P must be defined formally.
### Vehicle routing (simplified; single)
* CONTEXT:
* road network / map M
* INPUT:
* start, end locations in M
* OUTPUT:
* path
* CONDITIONS:
* path in M
* path[0] == start
* path[-1] == end