Antares Xpansion
Investment simulations for Antares studies
Loading...
Searching...
No Matches
solver_utils.h
1#pragma once
2
3#include <cassert>
4#include <sstream>
5
6#include "antares-xpansion/xpansion_interfaces/LogUtils.h"
7#include "antares-xpansion/multisolver_interface/Solver.h"
8
10 : public LogUtils::XpansionError<std::runtime_error> {
11 using LogUtils::XpansionError<std::runtime_error>::XpansionError;
12};
13
29void solver_getrows(const SolverAbstract &solver_p, std::vector<int> &mstart_p, std::vector<int> &mclind_p,
30 std::vector<double> &dmatval_p, int first_p, int last_p);
31
41void solver_get_obj_func_coeffs(const SolverAbstract &solver_p,
42 std::vector<double> &obj_p, int first_p, int last_p);
43
64void solver_addcols(SolverAbstract &solver_p, std::vector<double> const &objx_p,
65 std::vector<int> const &mstart_p, std::vector<int> const &mrwind_p,
66 std::vector<double> const &dmatval_p, std::vector<double> const &bdl_p,
67 std::vector<double> const &bdu_p, std::vector<char> const &colTypes_p,
68 std::vector<std::string> const &colNames_p);
69
96void solver_addrows(SolverAbstract &solver_p, std::vector<char> const &qrtype_p,
97 std::vector<double> const &rhs_p,
98 std::vector<double> const &range_p,
99 std::vector<int> const &mstart_p,
100 std::vector<int> const &mclind_p,
101 std::vector<double> const &dmatval_p,
102 std::vector<std::string> const &names = {});
103
111void solver_getlpsolution(SolverAbstract::Ptr const solver_p,
112 std::vector<double> &x_p);
113
120void solver_getlpdual(SolverAbstract::Ptr const solver_p,
121 std::vector<double> &dual_p);
122
129void solver_getlpreducedcost(SolverAbstract::Ptr const solver_p,
130 std::vector<double> &dj_p);
131
145void solver_getrowtype(const SolverAbstract &solver_p,
146 std::vector<char> &qrtype_p, int first_p, int last_p);
147
160void solver_getrhs(const SolverAbstract &solver_p, std::vector<double> &rhs_p, int first_p, int last_p);
161
172void solver_getrhsrange(SolverAbstract::Ptr const solver_p,
173 std::vector<double> &range_p, int first_p, int last_p);
174
191void solver_getcolinfo(const SolverAbstract &solver_p,
192 std::vector<char> &coltype_p, std::vector<double> &bdl_p,
193 std::vector<double> &bdu_p, int first_p, int last_p);
194
205void solver_deactivaterows(SolverAbstract::Ptr solver_p,
206 std::vector<int> const &mindex);
207
229void solver_getbasis(SolverAbstract::Ptr solver_p, std::vector<int> &rstatus_p,
230 std::vector<int> &cstatus_p);
231
248void solver_chgbounds(SolverAbstract::Ptr solver_p,
249 std::vector<int> const &mindex_p,
250 std::vector<char> const &qbtype_p,
251 std::vector<double> const &bnd_p);
252
265void solver_rename_vars(SolverAbstract *outSolver_p,
266 const std::vector<std::string> &names_p);
Definition solver_utils.h:10
Definition SolverAbstract.h:170
std::shared_ptr< SolverAbstract > Ptr
Definition SolverAbstract.h:181