root/vtcross/trunk/src/cognitive_engines/DSA_CE/examples/libcross_demo.py @ 411

Revision 411, 1.1 KB (checked in by trnewman, 15 years ago)

Adding Apache license information.

  • 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
25from cross import *
26
27p = Parameter(1)
28currentParameters = Parameter(1)
29o = Observable(1)
30
31o[0].value = 15.00
32o[0].name = "energy"
33
34currentParameters[0].name = "channel"
35currentParameters[0].value = 3
36
37p = GetOptimalParameters(o,1,currentParameters,1);
38
39print p[0].name, p[0].value
40
41
Note: See TracBrowser for help on using the browser.