From 7f112e1d7e6cbb6c741cc25a9df76e221c2e894d Mon Sep 17 00:00:00 2001 From: Charlie Vanaret Date: Tue, 15 Oct 2024 23:42:33 +0200 Subject: [PATCH] AMPLModel: fixed a few int/fint conversions --- bindings/AMPL/AMPLModel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/AMPL/AMPLModel.cpp b/bindings/AMPL/AMPLModel.cpp index e6d9801e..fc9af6f5 100644 --- a/bindings/AMPL/AMPLModel.cpp +++ b/bindings/AMPL/AMPLModel.cpp @@ -198,7 +198,7 @@ namespace uno { this->asl_hessian.reserve(this->number_asl_hessian_nonzeros); // use Lagrangian scale: in AMPL, the Lagrangian is f + lambda.g, while Uno uses f - lambda.g - int error_flag{}; + fint error_flag{}; lagscale_ASL(this->asl, -1., &error_flag); } @@ -289,8 +289,8 @@ namespace uno { } // generate the sparsity pattern in the right sparse format - const int* asl_column_start = this->asl->i.sputinfo_->hcolstarts; - const int* asl_row_index = this->asl->i.sputinfo_->hrownos; + const fint* asl_column_start = this->asl->i.sputinfo_->hcolstarts; + const fint* asl_row_index = this->asl->i.sputinfo_->hrownos; // check that the column pointers are sorted in increasing order // TODO throw exception assert(in_increasing_order(asl_column_start, this->number_variables + 1) && "AMPLModel::evaluate_lagrangian_hessian: column starts are not ordered");