Skip to content

Commit

Permalink
AMPLModel: fixed a few int/fint conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
cvanaret committed Oct 15, 2024
1 parent e5940ef commit 7f112e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bindings/AMPL/AMPLModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 7f112e1

Please sign in to comment.