BatchNLPKernels.jl
BatchNLPKernels.BatchModel — TypeBatchModel{MT,E}A wrapper around ExaModel that pre-initializes buffers for batch operations. Allows efficient evaluation of multiple points simultaneously.
Fields
model::ExaModel: The underlying ExaModelbatch_size::Int: Number of points to evaluate simultaneouslyobj_work::MT: Batch objective values (nobj × batch_size)cons_work::MT: Batch constraint values (nconaug × batch_size)cons_out::MT: Dense constraint output buffer (ncon × batch_size)grad_work::MT: Batch gradient values (nnzg × batch_size)grad_out::MT: Dense gradient output buffer (nvar × batch_size)jprod_work::MT: Batch jacobian values (nnzj × batch_size)hprod_work::MT: Batch hessian values (nnzh × batch_size)jprod_out::MT: Batch jacobian-vector product buffer (ncon × batch_size)jtprod_out::MT: Batch jacobian transpose-vector product buffer (nvar × batch_size)hprod_out::MT: Batch hessian-vector product buffer (nvar × batch_size)viols_cons_out::MT: Constraint violation output buffer (ncon × batch_size)viols_vars_out::MT: Variable violation output buffer (nvar × batch_size)viols_cons::Interval: Constraint bounds as interval setviols_vars::Interval: Variable bounds as interval set
BatchNLPKernels.BatchModel — MethodBatchModel(model::ExaModel, batch_size::Int; config=BatchModelConfig())Create a BatchModel wrapper around an ExaModel with pre-allocated buffers for batch operations. Use config to specify which buffers to allocate.
BatchNLPKernels.BatchModelConfig — TypeBatchModelConfigConfiguration struct for controlling which buffers are allocated in a BatchModel.
Fields
obj::Bool: Allocate objective buffer (default: true)cons::Bool: Allocate constraint buffers (default: true)grad::Bool: Allocate gradient buffers (default: false)jac::Bool: Allocate jacobian buffer (default: false)hess::Bool: Allocate hessian buffer (default: false)jprod::Bool: Allocate jacobian-vector product buffer (default: false)jtprod::Bool: Allocate jacobian transpose-vector product buffer (default: false)hprod::Bool: Allocate hessian-vector product buffer (default: false)viols::Bool: Allocate constraint and variable violation buffers (default: false)
BatchNLPKernels.BatchModelConfig — MethodBatchModelConfig(:full)Full configuration with all buffers allocated.
BatchNLPKernels.BatchModelConfig — MethodBatchModelConfig(:gradients)Configuration to support obj, cons, and their gradients (grad, jtprod).
BatchNLPKernels.BatchModelConfig — MethodBatchModelConfig(:minimal)Minimal configuration with only objective and constraint buffers.
BatchNLPKernels.BatchModelConfig — MethodBatchModelConfig(:viol_grad)Configuration to support obj, cons, constraint/variable violations, and their gradients.
BatchNLPKernels.BatchModelConfig — MethodBatchModelConfig(:violations)Configuration to support obj, cons, and constraint/variable violations.
BatchNLPKernels.BatchModelConfig — MethodBatchModelConfig(; obj=true, cons=true, grad=false, jac=false, hess=false, jprod=false, jtprod=false, hprod=false, viols=false)Create a BatchModelConfig with specified buffer allocations.
BatchNLPKernels.Interval — TypeInterval{VT}Represents the RHS of M constraints g(xᵢ) ∈ [lᵢ, uᵢ] ∀i ∈ 1:M.
BatchNLPKernels.all_violations! — Methodall_violations!(bm::BatchModel, X::AbstractMatrix, Θ::AbstractMatrix)Compute all constraint and variable violations for a batch of solutions and parameters.
BatchNLPKernels.all_violations! — Methodall_violations!(bm::BatchModel, X::AbstractMatrix)Compute all constraint and variable violations for a batch of solutions.
BatchNLPKernels.bound_violations! — Methodbound_violations!(bm::BatchModel, X::AbstractMatrix)Compute variable violations for a batch of variable primal values.
BatchNLPKernels.constraint_violations! — Methodconstraint_violations!(bm::BatchModel, X::AbstractMatrix, Θ::AbstractMatrix)Compute constraint violations for a batch of constraint primal values.
BatchNLPKernels.constraint_violations! — Methodconstraint_violations!(bm::BatchModel, X::AbstractMatrix)Compute constraint violations for a batch of constraint primal values.
BatchNLPKernels.constraints! — Methodconstraints!(bm::BatchModel, X::AbstractMatrix, Θ::AbstractMatrix)Evaluate constraints for a batch of solutions and parameters.
BatchNLPKernels.constraints! — Methodconstraints!(bm::BatchModel, X::AbstractMatrix)Evaluate constraints for a batch of solutions.
BatchNLPKernels.constraints_jacobian! — Methodconstraints_jacobian!(bm::BatchModel, X::AbstractMatrix, Θ::AbstractMatrix)Evaluate Jacobian coordinates for a batch of points.
BatchNLPKernels.constraints_jacobian! — Methodconstraints_jacobian!(bm::BatchModel, X::AbstractMatrix)Evaluate Jacobian coordinates for a batch of points.
BatchNLPKernels.constraints_jprod! — Methodconstraints_jprod!(bm::BatchModel, X::AbstractMatrix, Θ::AbstractMatrix, V::AbstractMatrix)Evaluate Jacobian-vector products for a batch of points.
BatchNLPKernels.constraints_jprod! — Methodconstraints_jprod!(bm::BatchModel, X::AbstractMatrix, V::AbstractMatrix)Evaluate Jacobian-vector products for a batch of points.
BatchNLPKernels.constraints_jprod! — Methodconstraints_jprod!(bm::BatchModel, X::AbstractMatrix, Θ::AbstractMatrix, V::AbstractMatrix, Jv::AbstractMatrix)Evaluate Jacobian-vector products for a batch of points.
BatchNLPKernels.constraints_jtprod! — Methodconstraints_jtprod!(bm::BatchModel, X::AbstractMatrix, Θ::AbstractMatrix, V::AbstractMatrix)Evaluate Jacobian-transpose-vector products for a batch of points.
BatchNLPKernels.constraints_jtprod! — Methodconstraints_jtprod!(bm::BatchModel, X::AbstractMatrix, V::AbstractMatrix)Evaluate Jacobian-transpose-vector products for a batch of points.
BatchNLPKernels.constraints_jtprod! — Methodconstraints_jtprod!(bm::BatchModel, X::AbstractMatrix, Θ::AbstractMatrix, V::AbstractMatrix, Jtv::AbstractMatrix)Evaluate Jacobian-transpose-vector products for a batch of points.
BatchNLPKernels.lagrangian_hessian! — Methodlagrangian_hessian!(bm::BatchModel, X::AbstractMatrix, Θ::AbstractMatrix, Y::AbstractMatrix; obj_weight=1.0)Evaluate Hessian coordinates for a batch of points.
BatchNLPKernels.lagrangian_hessian! — Methodlagrangian_hessian!(bm::BatchModel, X::AbstractMatrix, Y::AbstractMatrix; obj_weight=1.0)Evaluate Hessian coordinates for a batch of points.
BatchNLPKernels.lagrangian_hprod! — Methodlagrangian_hprod!(bm::BatchModel, X::AbstractMatrix, Y::AbstractMatrix, V::AbstractMatrix; obj_weight=1.0)Evaluate Hessian-vector products for a batch of points.
BatchNLPKernels.lagrangian_hprod! — Methodlagrangian_hprod!(bm::BatchModel, X::AbstractMatrix, Θ::AbstractMatrix, Y::AbstractMatrix, V::AbstractMatrix; obj_weight=1.0)Evaluate Hessian-vector products for a batch of points.
BatchNLPKernels.objective! — Methodobjective!(bm::BatchModel, X::AbstractMatrix, Θ::AbstractMatrix)Evaluate objective function for a batch of points.
BatchNLPKernels.objective! — Methodobjective!(bm::BatchModel, X::AbstractMatrix)Evaluate objective function for a batch of points.
BatchNLPKernels.objective_gradient! — Methodobjective_gradient!(bm::BatchModel, X::AbstractMatrix, Θ::AbstractMatrix, G::AbstractMatrix)Evaluate gradients for a batch of points with different parameters.
BatchNLPKernels.objective_gradient! — Methodobjective_gradient!(bm::BatchModel, X::AbstractMatrix, Θ::AbstractMatrix)Evaluate objective gradient for a batch of points.
BatchNLPKernels.objective_gradient! — Methodobjective_gradient!(bm::BatchModel, X::AbstractMatrix)Evaluate objective gradient for a batch of points.