001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package org.wpilib.math.optimization.ocp;
006
007import org.wpilib.math.autodiff.Variable;
008import org.wpilib.math.autodiff.VariableMatrix;
009
010/**
011 * A callback f(t, x, u, dt) where t is time, x is the state vector, u is the input vector, and dt
012 * is the timestep duration.
013 */
014@FunctionalInterface
015public interface ConstraintEvaluationFunction {
016  /**
017   * Applies this function with the arguments.
018   *
019   * @param t Time in seconds.
020   * @param x State vector.
021   * @param u Input vector.
022   * @param dt Timestep duration in seconds.
023   */
024  void accept(Variable t, VariableMatrix x, VariableMatrix u, Variable dt);
025}