author | klao |
Sun, 09 Jan 2005 23:21:52 +0000 | |
changeset 1066 | 520769d825f2 |
parent 999 | 5c846ec3f787 |
child 1096 | 1cfb25ef14d2 |
permissions | -rw-r--r-- |
ladanyi@960 | 1 |
#include "simann.h" |
ladanyi@960 | 2 |
|
ladanyi@960 | 3 |
using namespace lemon; |
ladanyi@960 | 4 |
|
ladanyi@960 | 5 |
class MyEntity { |
ladanyi@960 | 6 |
public: |
ladanyi@1023 | 7 |
double getCost() { return 10.0; } |
ladanyi@1023 | 8 |
void mutate() {} |
ladanyi@960 | 9 |
void revert() {} |
ladanyi@960 | 10 |
}; |
ladanyi@960 | 11 |
|
ladanyi@960 | 12 |
int main() { |
ladanyi@960 | 13 |
SimAnn<MyEntity> simann; |
ladanyi@960 | 14 |
SimpleController ctrl; |
ladanyi@960 | 15 |
simann.setController(ctrl); |
ladanyi@960 | 16 |
MyEntity ent; |
ladanyi@960 | 17 |
simann.setEntity(ent); |
ladanyi@960 | 18 |
simann.run(); |
ladanyi@999 | 19 |
|
ladanyi@999 | 20 |
SimAnn<MyEntity> simann2; |
ladanyi@999 | 21 |
AdvancedController ctrl2(20.0); |
ladanyi@999 | 22 |
simann2.setController(ctrl2); |
ladanyi@999 | 23 |
MyEntity ent2; |
ladanyi@999 | 24 |
simann2.setEntity(ent2); |
ladanyi@999 | 25 |
simann2.run(); |
ladanyi@960 | 26 |
} |