[Cbc] how to modify coefficient in OsiCbcModel
Ivan Meireles Costa
ivan.costa at gapso.com.br
Mon Sep 24 14:27:33 EDT 2012
I tried
bool OPT_COIN::chgCoef( int row, int col, double newcoef )
{
bool ret = true;
CbcModel *model = getModel();
CoinPackedMatrix *matrix = model->getMutableMatrixByCol();
matrix->modifyCoefficient(col, row, newcoef);
return ret;
}
and add
/// Get pointer to mutable column-wise copy of matrix
inline CoinPackedMatrix * getMutableMatrixByCol() const {
return solver_->getMutableMatrixByCol();
}
in CbcModel.hpp.
Att.
--
*Ivan Meireles Costa*
*Estágiario em otimização*
*Telefone:* 31 3508-1323
*Celular:* 31 9869-6987
A Gapso é a escolha das empresas que buscam se diferenciar pela gestão
da complexidade.
Desenvolvemos sistemas analíticos de planejamento, que auxiliam a definir
estratégias,
planejar operações, reduzir riscos e lidar melhor com as incertezas do
futuro.
www.gapso.com.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20120924/30bf6bb9/attachment.html>
More information about the Cbc
mailing list