ampl / mp

An open-source library for mathematical programming
https://mp.ampl.com
Other
229 stars 42 forks source link

Suffix sparsity #204

Closed glebbelov closed 1 year ago

glebbelov commented 1 year ago

mp::BasicProblem and mp::BasicBackend should probably provide sparsity information for suffixes. This has been done for primal initial guesses, see #203, but is missing in general: a suffix is reported and provided as a dense vector.

This is only needed if suffixes can supply 0 values (i.e., 0 is not equivalent to "not set").

Possible API extension: ReadSuffixSparsity() for reading. For reporting a suffix, ReportSuffix() could take an extra parameter - sparsity pattern.

glebbelov commented 1 year ago

For suffixes, 0 means "not set", i.e., the dense vectors automatically provide sparsity pattern.