@@ -47,7 +47,7 @@ class Model {
4747 // ! Constraints.
4848 std::vector<SCIP_Cons*> m_cons {};
4949 // ! Stores the return of the last %SCIP call when the default call wrapper is used.
50- SCIP_Retcode m_lastReturnCode;
50+ mutable SCIP_Retcode m_lastReturnCode;
5151 // ! Wrapper for every call to %SCIP's %C %API.
5252 std::function<void (SCIP_Retcode)> m_scipCallWrapper;
5353
@@ -204,14 +204,14 @@ class Model {
204204 * Solve the model.
205205 * @since 1.0.0
206206 */
207- void solve ();
207+ void solve () const ;
208208
209209 /* *
210210 * Set objective goal.
211211 * @since 1.0.0
212212 * @param objsense Minimize or Maximize.
213213 */
214- void setObjsense (Sense objsense);
214+ void setObjsense (Sense objsense) const ;
215215
216216 /* *
217217 * Returns the solution status.
@@ -270,7 +270,7 @@ class Model {
270270 * @param value to set the parameter to.
271271 */
272272 template <typename T, typename PT>
273- void setParam (params::Param<PT> parameter, T value)
273+ void setParam (params::Param<PT> parameter, T value) const
274274 {
275275 auto ptValue { static_cast <PT>(value) };
276276 const auto * cName { parameter.scipName .data () };
@@ -346,6 +346,6 @@ class Model {
346346 bool completely = true ,
347347 bool checkBounds = true ,
348348 bool checkIntegrality = true ,
349- bool checkLpRows = true );
349+ bool checkLpRows = true ) const ;
350350};
351351}
0 commit comments