wbap / v1 Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Returns:
numpy.ndarray: a value vector for the in-port ID.
They actually return a Port object.
Component を Agent に足そうとするとエラーになります(仕様)が、
その後で通常の Module を足しても同じエラーが出てしまいます。
ログ:
import numpy as np
import brica1
CompA = brica1.ConstantComponent()
ModA = brica1.Module()
ModA.add_component("CompA", CompA)
s = brica1.VirtualTimeSyncScheduler()
agent = brica1.Agent(s)
agent.add_submodule("ModA", ModA)
agent.add_submodule("ModA", ModA) ← add_submoduleを2度呼んでも大丈夫
agent.add_submodule("CompA", CompA) ← Component を Agent に足そうとするとエラー
Traceback (most recent call last):
File "", line 1, in
File "brica1/module.py", line 232, in add_submodule
self.update_scheduler()
File "brica1/module.py", line 217, in update_scheduler
self.scheduler.update(self)
File "brica1/scheduler.py", line 70, in update
self.components = ca.get_all_components()
File "brica1/module.py", line 156, in get_all_components
for submodule in self.get_all_submodules():
File "brica1/module.py", line 95, in get_all_submodules
array.extend(submodule.get_all_submodules())
AttributeError: 'ConstantComponent' object has no attribute 'get_all_submodules'
agent.add_submodule("ModA", ModA) ← 通常の Module を足しても同じエラー
Traceback (most recent call last):
File "", line 1, in
File "brica1/module.py", line 232, in add_submodule
self.update_scheduler()
File "brica1/module.py", line 217, in update_scheduler
self.scheduler.update(self)
File "brica1/scheduler.py", line 70, in update
self.components = ca.get_all_components()
File "brica1/module.py", line 156, in get_all_components
for submodule in self.get_all_submodules():
File "brica1/module.py", line 95, in get_all_submodules
array.extend(submodule.get_all_submodules())
AttributeError: 'ConstantComponent' object has no attribute 'get_all_submodules'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.