ControlCruise

Toy longitudinal vehicle, dt=0.1 s; action [-1,1] combines throttle/brake. dv/dt = 3*action - 0.05*v - 9.81*grade. Grade is a small road slope.
Imports
import Control; open Control; import Math;
Table of Contents

Types

ControlCruise

(inductive)
inductive ControlCruise

Constructors

For each type in this module: inductive types list their declared constructors; opaque types list any local function whose name starts with mk and which returns a value of that type.

ControlCruise (inductive)

mk

constructor
ControlCruise

Functions

speed

def speed (s : ControlCruise) : Float

integral

def integral (s : ControlCruise) : Float

step

def step (s : ControlCruise) (command : Float) : ControlCruise

invalid

def invalid (s : ControlCruise) : Bool

pi

def pi (kp : Float) (ki : Float) (error : Float) (integral : Float) : Float

reference

def reference (error : Float) (integral : Float) : Float

coast

def coast (error : Float) (integral : Float) : Float

advance

def advance (policy : (error : Float) → (integral : Float) → Float) (s : ControlCruise) : ControlCruise

cost

def cost (policy : (error : Float) → (integral : Float) → Float) (s : ControlCruise) : Float

episode

def episode (horizon : Int | horizon ≥ 0 && horizon ≤ 500) (policy : (error : Float) → (integral : Float) → Float) (initial : ControlCruise) : Control

training

def training (policy : (error : Float) → (integral : Float) → Float) : Float

held_out

def held_out (policy : (error : Float) → (integral : Float) → Float) : Float