equal
deleted
inserted
replaced
390 virtual void _setRowLowerBound(int i, Value value) = 0; |
390 virtual void _setRowLowerBound(int i, Value value) = 0; |
391 virtual void _setRowUpperBound(int i, Value value) = 0; |
391 virtual void _setRowUpperBound(int i, Value value) = 0; |
392 virtual void _setObjCoeff(int i, Value obj_coef) = 0; |
392 virtual void _setObjCoeff(int i, Value obj_coef) = 0; |
393 virtual SolveExitStatus _solve() = 0; |
393 virtual SolveExitStatus _solve() = 0; |
394 virtual Value _getPrimal(int i) = 0; |
394 virtual Value _getPrimal(int i) = 0; |
395 virtual SolutionStatus _getPrimalType() = 0; |
395 virtual Value _getPrimalValue() = 0; |
396 |
396 virtual SolutionStatus _getPrimalStatus() = 0; |
|
397 virtual void _setMax() = 0; |
|
398 virtual void _setMin() = 0; |
|
399 |
397 |
400 |
398 void clearObj() {} |
401 void clearObj() {} |
399 public: |
402 public: |
400 |
403 |
401 |
404 |
425 ///\endcode |
428 ///\endcode |
426 ///- a standard STL compatible iterable container with |
429 ///- a standard STL compatible iterable container with |
427 ///\ref Col as its \c mapped_type |
430 ///\ref Col as its \c mapped_type |
428 ///like |
431 ///like |
429 ///\code |
432 ///\code |
430 ///std::map<AnyType,LpSolverBase::Col> |
433 ///std::map<AnyStatus,LpSolverBase::Col> |
431 ///\endcode |
434 ///\endcode |
432 ///- an iterable lemon \ref concept::WriteMap "write map" like |
435 ///- an iterable lemon \ref concept::WriteMap "write map" like |
433 ///\code |
436 ///\code |
434 ///ListGraph::NodeMap<LpSolverBase::Col> |
437 ///ListGraph::NodeMap<LpSolverBase::Col> |
435 ///ListGraph::EdgeMap<LpSolverBase::Col> |
438 ///ListGraph::EdgeMap<LpSolverBase::Col> |
604 clearObj(); |
607 clearObj(); |
605 for (Expr::iterator i=e.begin(); i!=e.end(); ++i) |
608 for (Expr::iterator i=e.begin(); i!=e.end(); ++i) |
606 objCoeff((*i).first,(*i).second); |
609 objCoeff((*i).first,(*i).second); |
607 } |
610 } |
608 |
611 |
|
612 ///Maximize |
|
613 void max() { _setMax(); } |
|
614 ///Minimize |
|
615 void min() { _setMin(); } |
|
616 |
|
617 |
609 ///@} |
618 ///@} |
610 |
619 |
611 |
620 |
612 ///\name Solve the LP |
621 ///\name Solve the LP |
613 |
622 |
621 ///\name Obtain the solution |
630 ///\name Obtain the solution |
622 |
631 |
623 ///@{ |
632 ///@{ |
624 |
633 |
625 ///\e |
634 ///\e |
626 SolutionStatus primalType() { |
635 SolutionStatus primalStatus() { |
627 return _getPrimalType(); |
636 return _getPrimalStatus(); |
628 } |
637 } |
629 |
638 |
630 ///\e |
639 ///\e |
631 Value primal(Col c) { return _getPrimal(cols.floatingId(c.id)); } |
640 Value primal(Col c) { return _getPrimal(cols.floatingId(c.id)); } |
632 |
641 |
|
642 ///\e |
|
643 |
|
644 ///\return |
|
645 ///- \ref INF or -\ref INF means either infeasibility or unboundedness |
|
646 /// of the primal problem, depending on whether we minimize or maximize. |
|
647 ///- \ref NAN if no primal solution is found. |
|
648 ///- The (finite) objective value if an optimal solution is found. |
|
649 Value primalValue() { return _getPrimalValue();} |
633 ///@} |
650 ///@} |
634 |
651 |
635 }; |
652 }; |
636 |
653 |
637 ///\e |
654 ///\e |