Module grote_opdracht::model [] [src]

The model of our solver.

Important note about rounding

To prevent rounding errors we keep track of time and score by multiplying the time in seconds by 10, meaning that a minute consist of 600 time units.

Structs

Order

Representds a single order from orders.txt.

Segment

Part of a route, starting and ending at DUMP_LOCATION.

State

Represents the searchable state in which we will try to minimize our score using local search algorithms. Operators come in two forms:

Enums

Action

The action that should be performed for the operator. This is done as an optimization so we don't have to calculate information twice. Items are always inserted before index.

StateError

All the errors that can occur while trying to modify the state.

Constants

CAPACITY

The hauling capacity of a single truck, in liters.

DAY_LENGTH

The length of a day in time units.

DUMPING_TIME

The amount of time it takes to dump the load, in time units.

DUMP_LOCATION

The location of the garbage disposal on the distance matrix.

DUMP_ORDER_ID

The 'order id' of a dumping operation.

TIME_PER_MINUTE

The number of time units in a minute.

TIME_PER_SECOND

The number of time units in a second.

Type Definitions

EventIndex

(vehicle, day, segment, event_id) indices for events.

OrderList
Time

Time is stored in tenths of seconds.

TravelTime

TravelTime[(a, b)] represents the travel distance from a to b in time units. The input data is in seconds, so it be multiplied with TIME_PER_SECOND first.