/*
- * Copyright (C) 2005-2011 University of Karlsruhe. All right reserved.
- *
* This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
+ * Copyright (C) 2012 University of Karlsruhe.
*/
/**
*/
#include "config.h"
-#ifdef WITH_CPLEX
#include "lpp_cplex.h"
+#include "error.h"
+
+#ifdef WITH_CPLEX
#include <stdio.h>
#include <stdlib.h>
*/
static void cpx_construct(cpx_t *cpx)
{
- const matrix_elem_t *elem;
- int i, o, sv_cnt;
- int numcols, numrows, numentries;
- int objsen, *matbeg, *matcnt, *matind, *indices;
- double *obj, *rhs, *matval, *lb, *ub, *startv;
- char *sense, *vartype;
- char **colname, **rowname;
- struct obstack obst;
- lpp_t *lpp = cpx->lpp;
+ int i, o, sv_cnt;
+ int numcols, numrows, numentries;
+ int objsen, *matbeg, *matcnt, *matind, *indices;
+ double *obj, *rhs, *matval, *lb, *ub, *startv;
+ char *sense, *vartype;
+ char **colname, **rowname;
+ struct obstack obst;
+ lpp_t *lpp = cpx->lpp;
numcols = lpp->var_next-1;
numrows = lpp->cst_next-1;
// CPXsetintparam (cpx->env, CPX_PARAM_SCRIND, CPX_ON);
/* solve */
- timing_ticks(&tvb);
+ timing_ticks(tvb);
cpx->status = CPXmipopt(cpx->env, cpx->prob);
- timing_ticks(&tva);
+ timing_ticks(tva);
chk_cpx_err(cpx);
/* get solution status */
free_cpx(cpx);
}
+#else
+
+void lpp_solve_cplex(lpp_t *lpp)
+{
+ (void)lpp;
+ panic("libfirm compiled without cplex support");
+}
+
#endif