Result¶
OptimizeResult¶
givp.OptimizeResult
dataclass
¶
Container for optimization output, modeled after scipy.optimize.OptimizeResult.
Attributes:
| Name | Type | Description |
|---|---|---|
x |
NDArray[float64]
|
Best solution vector found, in the user's variable space. |
fun |
float
|
Objective value at |
nit |
int
|
Number of GRASP outer iterations executed. |
nfev |
int
|
Number of objective function evaluations. |
success |
bool
|
Whether at least one feasible solution was produced. |
message |
str
|
Human-readable termination reason. |
direction |
str
|
|
meta |
AlgorithmMeta
|
Additional algorithm-specific information (cache stats, etc.). |
to_dict ¶
Serialize to a JSON-safe dict with typed, schema-validated fields.
All values are Python primitives — no numpy types. The termination
field is a TerminationReason enum value (closed set), which prevents
prompt-injection via free-form message strings when passed to LLM agents.