Skip to content

Commit

Permalink
COPT con names #209
Browse files Browse the repository at this point in the history
Bump dates
  • Loading branch information
glebbelov committed Jul 24, 2023
1 parent d1e6522 commit 1fab7e3
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGES.mp.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Summary of recent updates to the AMPL MP Library
================================================

## 20230724
- option [solver_]auxfiles rc; transfers names
of variables and constraints into the model;
(solver)_options 'cvt:names=0-3' controls names.


## 20230714
- Print warnings in non-verbose mode too.
- 'barrier' equivalent to 'barrier=1' for integer options.
Expand Down
6 changes: 6 additions & 0 deletions solvers/copt/CHANGES.copt.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Summary of recent updates to COPT for AMPL
==========================================

## 20230724
- option [solver_]auxfiles rc; transfers names
of variables and linear constraints into the model;
(solver)_options 'cvt:names=0-3' controls names.


## 20230621
- Fix quadratic objective with repeated subexpressions.

Expand Down
14 changes: 7 additions & 7 deletions solvers/copt/coptmodelapi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,47 +42,47 @@ void CoptModelAPI::AddConstraint(const LinConRange& lc) {
lc.pvars(), lc.pcoefs(), 0,
lc.lb() < -COPT_INFINITY ? -COPT_INFINITY : lc.lb(),
lc.ub() > COPT_INFINITY ? COPT_INFINITY : lc.ub(),
NULL));
lc.name()));
}

void CoptModelAPI::AddConstraint(const LinConLE& lc) {
char sense = COPT_LESS_EQUAL;
COPT_CCALL(COPT_AddRow(lp(), lc.size(), lc.pvars(), lc.pcoefs(),
sense, lc.rhs(), 0, NULL));
sense, lc.rhs(), 0, lc.name()));
}
void CoptModelAPI::AddConstraint(const LinConEQ& lc) {
char sense = COPT_EQUAL;
COPT_CCALL(COPT_AddRow(lp(), lc.size(), lc.pvars(), lc.pcoefs(),
sense, lc.rhs(), 0, NULL));
sense, lc.rhs(), 0, lc.name()));
}
void CoptModelAPI::AddConstraint(const LinConGE& lc) {
char sense = COPT_GREATER_EQUAL;
COPT_CCALL(COPT_AddRow(lp(), lc.size(), lc.pvars(), lc.pcoefs(),
sense, lc.rhs(), 0, NULL));
sense, lc.rhs(), 0, lc.name()));
}

void CoptModelAPI::AddConstraint(const QuadConLE& qc) {
const auto& lt = qc.GetLinTerms();
const auto& qt = qc.GetQPTerms();
COPT_CCALL(COPT_AddQConstr(lp(), lt.size(), (int*)lt.pvars(), (double*)lt.pcoefs(),
qt.size(), (int*)qt.pvars1(), (int*)qt.pvars2(),
(double*)qt.pcoefs(), COPT_LESS_EQUAL, qc.rhs(), NULL));
(double*)qt.pcoefs(), COPT_LESS_EQUAL, qc.rhs(), qc.name()));
}

void CoptModelAPI::AddConstraint(const QuadConEQ& qc) {
const auto& lt = qc.GetLinTerms();
const auto& qt = qc.GetQPTerms();
COPT_CCALL(COPT_AddQConstr(lp(), lt.size(), (int*)lt.pvars(), (double*)lt.pcoefs(),
qt.size(), (int*)qt.pvars1(), (int*)qt.pvars2(),
(double*)qt.pcoefs(), COPT_EQUAL, qc.rhs(), NULL));
(double*)qt.pcoefs(), COPT_EQUAL, qc.rhs(), qc.name()));
}

void CoptModelAPI::AddConstraint(const QuadConGE& qc) {
const auto& lt = qc.GetLinTerms();
const auto& qt = qc.GetQPTerms();
COPT_CCALL(COPT_AddQConstr(lp(), lt.size(), (int*)lt.pvars(), (double*)lt.pcoefs(),
qt.size(), (int*)qt.pvars1(), (int*)qt.pvars2(),
(double*)qt.pcoefs(), COPT_GREATER_EQUAL, qc.rhs(), NULL));
(double*)qt.pcoefs(), COPT_GREATER_EQUAL, qc.rhs(), qc.name()));
}


Expand Down
6 changes: 6 additions & 0 deletions solvers/gurobi/CHANGES.gurobi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Summary of recent updates to gurobi for AMPL
============================================

## 20230724
- option [solver_]auxfiles rc; transfers names
of variables and constraints into the model;
(solver)_options 'cvt:names=0-3' controls names.


## 20230625
- Updated to Gurobi libraries 10.0.2, which include many bugfixes.

Expand Down
6 changes: 6 additions & 0 deletions solvers/highsmp/CHANGES.highsmp.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Summary of recent updates to HiGHS for AMPL
===========================================

## 20230724
- option [solver_]auxfiles rc; transfers names
of variables and linear constraints into the model;
(solver)_options 'cvt:names=0-3' controls names.


## 20230621
- Fix quadratic objective with repeated subexpressions.
- Fix Hessian API.
Expand Down
7 changes: 7 additions & 0 deletions solvers/mosek/CHANGES.mosek.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Summary of recent updates to MOSEK for AMPL
===========================================


## 20230724
- option [solver_]auxfiles rc; transfers names
of variables and linear constraints into the model;
(solver)_options 'cvt:names=0-3' controls names.


## 20230621
- Fix quadratic objective with repeated subexpressions.

Expand Down
6 changes: 6 additions & 0 deletions solvers/xpress/CHANGES.xpress.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ Summary of recent updates to Xpress for AMPL
============================================


## 20230724
- option [solver_]auxfiles rc; transfers names
of variables and linear constraints into the model;
(solver)_options 'cvt:names=0-3' controls names.


## 20230714
- Options barrier/primal/dual/network like in ASL.

Expand Down

0 comments on commit 1fab7e3

Please sign in to comment.