itinerary

package
v0.0.0-...-40a4415 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CarStopCost

type CarStopCost struct {
	Stop  route.IMainStop
	Index int
	// contains filtered or unexported fields
}

type Constructor

type Constructor interface {
	Info
	LandAllDrones(landingStop route.IMainStop)
	LandDrone(droneNumber DroneNumber, destination route.IMainStop)
	MoveCar(destination gps.Point)
	MoveDrone(droneNumber DroneNumber, destination gps.Point)
	StartDroneFlight(droneNumber DroneNumber, startingPoint route.IMainStop)
}

type DroneNumber

type DroneNumber int

TODO: Hide its implementation from other packages tests Avoid 'var mockedDrone1 = itinerary.DroneNumber(1)'

type DroneStopCost

type DroneStopCost struct {
	Index  int
	Stop   route.ISubStop
	Flight route.ISubRoute
	// contains filtered or unexported fields
}

type Finder

type Finder interface {
	FindWorstDroneStop() DroneStopCost
	FindWorstSwappableCarStopsOrdered() []CarStopCost
}

type Info

type Info interface {
	ActualCarPoint() gps.Point
	ActualCarStop() route.IMainStop
	CarEfficiency() float64
	CarSpeed() float64
	CarSupport(nextPoints ...gps.Point) bool
	DroneCanReach(droneNumber DroneNumber, nextPoints ...gps.Point) bool
	DroneEfficiency() float64
	DroneIsFlying(droneNumber DroneNumber) bool
	DroneNumbers() []DroneNumber
	DroneSpeed() float64
	DroneSupport(droneNumber DroneNumber, deliveryPoint gps.Point, landingPoint gps.Point) bool
	RouteIterator() slc.Iterator[route.IMainStop]
	SubItineraryList() []SubItinerary
}

type Itinerary

type Itinerary interface {
	Info() Info
	Constructor() Constructor
	Finder() Finder
	Modifier() Modifier
}

func New

func New(car vehicle.ICar) Itinerary

type Modifier

type Modifier interface {
	Info
	RemoveDroneStopFromFlight(index int, flight route.ISubRoute)
	RemoveMainStopFromRoute(index int)
	InsertDroneDelivery(point gps.Point, calcCost func(Info) float64) error
	InsertCarDelivery(point gps.Point, calcCost func(Info) float64) error
}

type SubItinerary

type SubItinerary struct {
	Drone  vehicle.IDrone
	Flight route.ISubRoute
}

Directories

Path Synopsis
Package mock_itinerary is a generated GoMock package.
Package mock_itinerary is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL