COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/work/akos/simann_demo.cc @ 1046:1bb1d4c87331

Last change on this file since 1046:1bb1d4c87331 was 1023:3268fef5d623, checked in by Akos Ladanyi, 20 years ago

Added a getCost() method to the Entity. Now prevCost() returns what its name suggests.

File size: 458 bytes
Line 
1#include "simann.h"
2
3using namespace lemon;
4
5class MyEntity {
6public:
7  double getCost() { return 10.0; }
8  void mutate() {}
9  void revert() {}
10};
11
12int main() {
13  SimAnn<MyEntity> simann;
14  SimpleController ctrl;
15  simann.setController(ctrl);
16  MyEntity ent;
17  simann.setEntity(ent);
18  simann.run();
19
20  SimAnn<MyEntity> simann2;
21  AdvancedController ctrl2(20.0);
22  simann2.setController(ctrl2);
23  MyEntity ent2;
24  simann2.setEntity(ent2);
25  simann2.run();
26}
Note: See TracBrowser for help on using the repository browser.