22 #ifndef OTAWA_ILP_SYSTEM_H
23 #define OTAWA_ILP_SYSTEM_H
25 #include <elm/io/OutStream.h>
26 #include <elm/string.h>
28 #include <elm/datastruct/Iterator.h>
48 double constant = 0) = 0;
54 virtual double value(
void) = 0;
101 #endif // OTAWA_ILP_SYSTEM_H
Iterator(IteratorInst< T > *_iter)
comparator_t
Definition: Constraint.h:36
bool hasDump(format_t fmt)
Tests if it is possible to dump in the given format.
Definition: ilp_System.cpp:599
virtual double valueOf(Var *var)=0
This method can only be called after the resolution of the system and returns the value of a variable...
virtual string lastErrorMessage(void)
Get the message of the last error.
Definition: ilp_System.cpp:125
virtual void dump(elm::io::OutStream &out=elm::io::out)
Dump the system to the given output.
Definition: ilp_System.cpp:101
format_t
Definition: features.h:30
virtual void dumpSolution(io::Output &out=elm::cout)=0
Dump the solution textually to the given output.
void dumpLPSolve(elm::io::OutStream &out=elm::io::out)
Dump in LPSolve format.
Definition: ilp_System.cpp:227
virtual void addObjectFunction(double coef, Var *var=0)=0
Add a factor to the object function.
virtual bool solve(WorkSpace *ws=0)=0
Solve the ILP system.
virtual elm::datastruct::IteratorInst< ilp::Constraint * > * constraints(void)=0
virtual Constraint * newConstraint(Constraint::comparator_t comp, double constant=0)=0
Build a new constraint that may be initialized by the user.
virtual double value(void)=0
Return the value of the optimized object function.
virtual ~System(void)
Definition: System.h:44
ConstIterator(elm::datastruct::IteratorInst< Constraint * > *_inst)
Definition: System.h:81
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
void dumpCPlex(elm::io::OutStream &out=elm::io::out)
Dump system in CPlex format.
Definition: ilp_System.cpp:439
ConstIterator(System *_sys)
Definition: System.h:83
ObjTermIterator(System *_sys)
Definition: System.h:94
void dumpMOSEK(elm::io::OutStream &out=elm::io::out)
Dump in MOSEK format.
Definition: ilp_System.cpp:315
sys::SystemOutStream & out
This class is used to represent constraints in an ILP system with the following form: ...
Definition: Constraint.h:33
Definition: Expression.h:35
virtual Var * newVar(const string &name="")=0
virtual void dumpSystem(io::Output &out=elm::cout)
Dump the system in text format (as a default, call exportLP).
Definition: ilp_System.cpp:638
cstring name
Definition: odisasm.cpp:107
virtual int countConstraints(void)=0
Count the number of constraints in the system.
virtual elm::datastruct::IteratorInst< ilp::Constraint::Term > * objTerms(void)=0
A variable is an identifier used for performing ILP computation.
Definition: Var.h:36
An ILP system is a colletion of ILP constraint that may maximize or minimize some object function...
Definition: System.h:42
virtual ILPPlugin * plugin(void)
Return the owner plugin.
Definition: ilp_System.cpp:144
This interface must be implemented by plugins providing ILP processors.
Definition: ILPPlugin.h:24
const Type & type(void)
Definition: type.h:163
Encapsulation for ilp::Var pointers for {ilp} expr user-fiendly interface.
Definition: expr.h:29
type_t
Type of an ILP variable.
Definition: Var.h:38
ObjTermIterator(elm::datastruct::IteratorInst< Constraint::Term > *_inst)
Definition: System.h:92
virtual void exportLP(io::Output &out=elm::cout)=0
Export the system to the given output using the LP format (lp_solve).
virtual int countVars(void)=0
Count the number of variables in the system.