Skip to content

Commit

Permalink
NLW C API: write LP #30
Browse files Browse the repository at this point in the history
  • Loading branch information
glebbelov committed Nov 14, 2023
1 parent 357dc02 commit ccd5f54
Show file tree
Hide file tree
Showing 7 changed files with 902 additions and 134 deletions.
4 changes: 2 additions & 2 deletions nl-writer2/examples/c/nlsol_ex_c_model.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CAPIExample MakeCAPIExample_Linear_01() {
= { {0, 14536}, {1, 22} };
static const SparseEntry* const rows[] = {row_01, row_02};

static int row_sizes[] = {2, 2};
static int row_nnz[] = {2, 2};
static int col_sizes[] = {2};

/// Objective
Expand All @@ -52,7 +52,7 @@ CAPIExample MakeCAPIExample_Linear_01() {
.con_name = con_name,

.con_linpart = rows,
.row_sizes = row_sizes,
.row_nnz = row_nnz,
.col_sizes = col_sizes,
.n_con_nz = 4,

Expand Down
2 changes: 1 addition & 1 deletion nl-writer2/examples/c/nlsol_ex_c_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ typedef struct CAPIExample {


/// Sparse vector per constraint
const int* row_sizes;
const int* row_nnz;
const SparseEntry* const* con_linpart;

/// Sizes of all Jacobian columns except the last
Expand Down
Loading

0 comments on commit ccd5f54

Please sign in to comment.