Revision 416, 1.1 KB
(checked in by trnewman, 15 years ago)
|
Moving examples around to a more appropiate directory.
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | # Copyright 2009 Virginia Polytechnic Institute and State University |
---|
2 | # |
---|
3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
---|
4 | # you may not use this file except in compliance with the License. |
---|
5 | # You may obtain a copy of the License at |
---|
6 | # |
---|
7 | # http://www.apache.org/licenses/LICENSE-2.0 |
---|
8 | # |
---|
9 | # Unless required by applicable law or agreed to in writing, software |
---|
10 | # distributed under the License is distributed on an "AS IS" BASIS, |
---|
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
12 | # See the License for the specific language governing permissions and |
---|
13 | # limitations under the License. |
---|
14 | |
---|
15 | # Simple Python demonstration script for using |
---|
16 | # the CROSS system. |
---|
17 | # |
---|
18 | # Use with demo.xml shell configuration file |
---|
19 | # Instructions: |
---|
20 | # Start shell with demo.xml config from the examples directory |
---|
21 | # Start cognitive engine |
---|
22 | # Run this script |
---|
23 | # |
---|
24 | |
---|
25 | from cross import * |
---|
26 | |
---|
27 | p = Parameter(1) |
---|
28 | currentParameters = Parameter(1) |
---|
29 | o = Observable(1) |
---|
30 | |
---|
31 | o[0].value = 15.00 |
---|
32 | o[0].name = "energy" |
---|
33 | |
---|
34 | currentParameters[0].name = "channel" |
---|
35 | currentParameters[0].value = 3 |
---|
36 | |
---|
37 | p = GetOptimalParameters(o,1,currentParameters,1); |
---|
38 | |
---|
39 | print p[0].name, p[0].value |
---|
40 | |
---|
41 | |
---|