Skip to content

spaceteams.SC_Compute_Server.math.optimal.cone

ConeConstraint

G property writable

G: Annotated[NDArray[float64], '[m, n]']

'G' matrix for this cone constraint

coneType property writable

coneType: ConeType

Cone type (cone or non-negative orthant)

coordinates property writable

coordinates: MNCoordinates

MN coordinates for this cone constraint

h property writable

h: Annotated[NDArray[float64], '[m, 1]']

'h' vector for this cone constraint

Evaluate

Evaluate(x: Annotated[ArrayLike, float64, '[m, 1]'], e: Annotated[ArrayLike, float64, '[m, 1]'], varType: VariableType) -> bool

Evaluates whether the vector 'x' is within this cone (dependent on what type of variable 'x' is)

ConeType

ConeType(value: SupportsInt)

Members:

CONE :

ORTHANT :

CONE class-attribute

CONE: ConeType

ORTHANT class-attribute

ORTHANT: ConeType

name property

name: str

value property

value: int

ConvergenceResults

primalFeasibility property

primalFeasibility: bool

Whether the solution 'x' satisfies both linear and cone constraints

slackness property

slackness: bool

Whether the primal and dual slack variable vectors are orthogonal

stationarity property

stationarity: bool

Whether the gradient of the Lagrangian is zero

Epsilons

epsilonAbs property writable

epsilonAbs: float

Absolute tolerance

epsilonRel property writable

epsilonRel: float

Relative tolerance

MNCoordinates

mMax property writable

mMax: int

Ending 'm' index for this cone constraint

mMin property writable

mMin: int

Starting 'm' index for this cone constraint

nMax property writable

nMax: int

Ending 'nm' index for this cone constraint

nMin property writable

nMin: int

Starting 'n' index for this cone constraint

OptimizationResults

convergenceResults property

convergenceResults: ConvergenceResults

Detailed convergence results

cost property

cost: float

The optimal cost

qcpState property

qcpState: QCPState

The optimal (if converged) or final (if not converged) state of the problem

status property

status: QCPStatus

The solution status

QCPState

s property writable

s: Annotated[NDArray[float64], '[m, 1]']

Slack variables

x property writable

x: Annotated[NDArray[float64], '[m, 1]']

State variables

y property writable

y: Annotated[NDArray[float64], '[m, 1]']

Dual variables (costates)

z property writable

z: Annotated[NDArray[float64], '[m, 1]']

Dual slack variables

QCPStatus

QCPStatus(value: SupportsInt)

Members:

SOLVED : Problem is solved if all three convergence criteria are met

FAILED : Problem is unsolved if any of the three convergence criteria are unmet

FAILED class-attribute

FAILED: QCPStatus

SOLVED class-attribute

SOLVED: QCPStatus

name property

name: str

value property

value: int

QuadraticConeProblem

QuadraticConeProblem(A_eq: Annotated[ArrayLike, float64, '[m, n]'], b_eq: Annotated[ArrayLike, float64, '[m, 1]'], P_cost: Annotated[ArrayLike, float64, '[m, n]'], c_cost: Annotated[ArrayLike, float64, '[m, 1]'], coneConstraints: Sequence[ConeConstraint], n: SupportsInt, n_i: SupportsInt, m: SupportsInt, p: SupportsInt, l: SupportsInt, q: SupportsInt)

A_eq property

A_eq: Annotated[NDArray[float64], '[m, n]']

Equality constraint A matrix (Ax = b)

G property

G: Annotated[NDArray[float64], '[m, n]']

Assembled G matrix of cone constraints (h - G*x in cone K)

P_cost property

P_cost: Annotated[NDArray[float64], '[m, n]']

P matrix in performance index (J = 0.5x^TPx + c^Tx)

b_eq property

b_eq: Annotated[NDArray[float64], '[m, 1]']

Equality constraint b vector (Ax = b)

c_cost property

c_cost: Annotated[NDArray[float64], '[m, 1]']

c vector in performance index (J = 0.5x^TPx + c^Tx)

coneConstraints property

coneConstraints: list[ConeConstraint]

List of cone constraints

h property

h: Annotated[NDArray[float64], '[m, 1]']

Assembled h vector of cone constraints (h - G*x in cone K)

l property

l: int

Number of non-negative orthant constraints at every time step

m property

m: int

Number of cone constraints

n property

n: int

Total number of states (length of 'x')

n_i property

n_i: int

Number of states at every time step

p property

p: int

Number of equality constraints

q property

q: int

Number of cone constraints at every time step

SolveProblem

SolveProblem(absTol: SupportsFloat = 1e-06, relTol: SupportsFloat = 1e-06, maxIterations: SupportsInt = 200) -> OptimizationResults

Solves the quadratic second-order cone optimization problem

VariableType

VariableType(value: SupportsInt)

Members:

X : State variables

S : Slack variables

Y : Dual variables (costates)

Z : Dual slack variables

S class-attribute

S: VariableType

X class-attribute

X: VariableType

Y class-attribute

Y: VariableType

Z class-attribute

Z: VariableType

name property

name: str

value property

value: int