|
| KnapModel () |
|
| KnapModel (int cap, std::vector< std::pair< int, int > > items, int *seq) |
|
| ~KnapModel () |
|
int | getCapacity () const |
| Get the capacity of the knapsack.
|
|
int | getNumItems () const |
| Get the number of items in the knapsack.
|
|
int * | getSequence () const |
| Get the sequence of items in the knapsack.
|
|
virtual void | readParameters (const int argnum, const char *const *arglist) |
| Read in Alps and Knap parameters.
|
|
std::pair< int, int > | getItem (int i) const |
| Get the size of item i.
|
|
void | setCapacity (int capacity) |
| Set the capacity of the knapsack.
|
|
void | setSequence (const int *seq) |
| Set the sequence of items in the knapsack.
|
|
void | addItem (int size, int cost) |
| Set the size of item i.
|
|
void | readInstance (const char *dataFile) |
| Read in the problem data.
|
|
void | orderItems () |
| Order the items based on their cost/size.
|
|
virtual AlpsEncoded * | encode () const |
| The method that encodes the solution into a buffer.
|
|
virtual void | decodeToSelf (AlpsEncoded &) |
| The method that decodes model data from the encoded form and fill member data.
|
|
| AlpsModel () |
| Default construtor.
|
|
virtual | ~AlpsModel () |
| Destructor.
|
|
AlpsKnowledgeBroker * | getKnowledgeBroker () |
| Get knowledge broker.
|
|
void | setKnowledgeBroker (AlpsKnowledgeBroker *b) |
| Set knowledge broker.
|
|
std::string | getDataFile () const |
| Get the input file.
|
|
void | setDataFile (std::string infile) |
| Set the data file.
|
|
AlpsParams * | AlpsPar () |
| Access Alps Parameters.
|
|
void | writeParameters (std::ostream &outstream) const |
| Write out parameters.
|
|
virtual bool | setupSelf () |
| Do necessary work to make model ready for use, such as classify variable and constraint types.
|
|
virtual void | preprocess () |
| Preprocessing the model.
|
|
virtual void | postprocess () |
| Postprocessing results.
|
|
virtual AlpsTreeNode * | createRoot () |
| Create the root node.
|
|
virtual void | modelLog () |
| Problem specific log.
|
|
virtual void | nodeLog (AlpsTreeNode *node, bool force) |
| Node log.
|
|
virtual bool | fathomAllNodes () |
| Return true if all nodes on this process can be fathomed.
|
|
AlpsReturnStatus | encodeAlps (AlpsEncoded *encoded) const |
| Pack Alps portion of node into an encoded object.
|
|
AlpsReturnStatus | decodeAlps (AlpsEncoded &encoded) |
| Unpack Alps portion of node from an encoded object.
|
|
virtual void | registerKnowledge () |
| Register knowledge class.
|
|
virtual void | sendGeneratedKnowledge () |
| Send generated knowledge.
|
|
virtual void | receiveGeneratedKnowledge () |
| Receive generated knowledge.
|
|
virtual AlpsEncoded * | packSharedKnowlege () |
| Pack knowledge to be shared with others into an encoded object.
|
|
virtual void | unpackSharedKnowledge (AlpsEncoded &) |
| Unpack and store shared knowledge from an encoded object.
|
|
| AlpsKnowledge () |
|
virtual | ~AlpsKnowledge () |
|
KnowledgeType | getType () |
|
void | setType (KnowledgeType t) |
|
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded) |
| Pack into a encode object.
|
|
virtual AlpsKnowledge * | decode (AlpsEncoded &encoded) const |
| This method should decode and return a pointer to a brand new object, i.e., the method must create a new object on the heap from the decoded data instead of filling up the object for which the method was invoked.
|
|
AlpsEncoded * | getEncoded () const |
| Get/set encoded.
|
|
void | setEncoded (AlpsEncoded *e) |
|
Definition at line 26 of file KnapModel.h.