Giter Site home page Giter Site logo

cupcarbon's People

Contributors

bounceur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cupcarbon's Issues

Maps can't load on Mac OS High Sierra

I opened CupCarbon-3.3.12 using the Jar Launcher 15.0.1. But it is not able to load Maps. There is nothing on a white display, except for CupCarbon, Virtualys logos. Is there any effect on this by Firewall? Please help.

Google Maps not working properly

I installed cupcarbon recently and everything was woking fine, but after saving a project and opening it again, the integration with Google Maps stopped working.

I've reinstalled Cupcarbon with no solution.

Java Version: Java 8 Update 301

image

Weather: Parsing Excpetion

For the Weather sensor, there is a parsing error being thrown every time a Natural Evt. file is attached.

The issue is that the Weather code parses the time as an integer but by default (as far as I can tell) the Natural Event Generator saves the time as a double.

I compared the Weather parsing code to the Gas parsing code (function, loadValuesFromFIle) and it looks like the Gas code correctly parses the time as a Double instead of an integer. See code snippets bellow comparing Weather to Gas.

Weather.java -> loadValuesFromFile

				while ((s = b.readLine()) != null) {
					ts = s.split(" ");
					valueTime.add(Integer.parseInt(ts[0]));
					values.add(Double.parseDouble(ts[1]));
				}

Gas.java -> loadValuesFromFile

				while ((s = b.readLine()) != null) {
					ts = s.split(" ");
					valueTime.add(Double.parseDouble(ts[0]));
					values.add(Double.parseDouble(ts[1]));
				}

Changing the Weather code to parse Integers instead of Doubles fixes this issue.

Python example codes problem

Hello

I have tried the receiver and transmitter examples in python, and strangely, I got an error:
"Exception in thread "Thread-14" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.LinkedList.checkElementIndex(LinkedList.java:555)
at java.util.LinkedList.get(LinkedList.java:476)
at senscript.SenScript.getCurrent(SenScript.java:138)
at simulation.WisenSimulation.start_simulation(WisenSimulation.java:252)
at simulation.WisenSimulation.simulate(WisenSimulation.java:74)
at simulation.WisenSimulation.run(WisenSimulation.java:479)
at java.lang.Thread.run(Thread.java:748)"

Does running python codes needs installation of anything from my side?

LoRa and sensor mobilty

It appears that sensors default to having radio1 ZigBee as the default and only radio supported when set to follow a route via GPS file.

Reproduce:

  1. Create x2 sensors with basic transit and receive scripts
  2. Add LoRa radio2 to both and set as current
  3. Create a test route and assign to S1
  4. Start simulation - all over sudden radio ranges are back to 100m ZigBee, LoRA is ignored

Please help.

Killing Sensors

Scenario:
I have some sensors, which have some predefined probability to be killed

I start the simulation and all works perfectly (the sensors will be killed)

However, when i stop the simulation, f.e. to make some adjustments, and i start the simulation again all connections between the sensors (to send messages) are deleted.

I tried to reset the radio range, but it has no effects

I uploaded a file with my settings:

To replicate the failure do the following:
1, Start the simulation --> all sensors will be killed
2. Try to restart the simulation --> All Arrows between sensors nodes are removed and there is no possibility to revive them

test.zip

SenScript - Change of radio not interpreted correctly

There is a bug in the software, when trying to change radio module through the SenScript.

I've tried several times, in several different script setups. I've also tried it with example 13 from the user guide, which does not work either.

I assume it's something with the interpretation of senscript, as changing the "current" radio in GUI works perfectly fine.

Several OS has been tried:

  • Windows 10, version 21H1:
    Build: 19043. 1348
  • Ubuntu KDE:
Operating System: Kubuntu 20.04  
KDE Plasma Version: 5.18.5  
KDE Frameworks Version: 5.68.0  
Qt Version: 5.12.8
Kernel Version: 5.4.0-90-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz
Memory: 15.3 GiB of RAM

4K resolution support

Hello, I just launched CupCarbon on my 4K screen and, as you can see on the following picture, the interface is absolutely not scaling and it is very painful to use.
cupcarbon-4k
It would probably be interesting to fix since more and more laptops will probably have that type of screen in the future. I faced this issue on a common Dell XPS laptop running Linux Mint with the Cinnamon desktop environment.

Issues in creation new function

I am trying to create my own function as user-guide recommended. I wrote the following codes in the following paths.

(Path) Package Script_functions=> Class ScriptFunction=> method function

      if (function.equals("myf")){

            return Function_Calc.myf(args);

        } 

I wrote the below code in this path. (Path) Package Script_functions=> Class Functions

public static String myf (String [] args) throws Exception{

                String valToReturn = "Nassser";

                return valToReturn;

}

And I invoked the function as follows:

function x myf
But unfortunately, it didn't work.

Minor issue in log messages for SenScriptCondition_LESS, SenScriptCondition_LESSEQUAL, SenScriptCondition_GREATEREQUAL, SenScriptCondition_GREATER

A minor issue.
The error message in second try catch statement of the evaluate() method of the classes reported in the title
should be related to the arg2 variable:

try {
v2 = Double.valueOf(sensor.getScript().getVariableValue(arg2));
}
catch(Exception e) {
// System.err.println("[CupCarbon ERROR] (S"+sensor.getId()+"): Condition > ("+arg1+" is not a number)");
System.err.println("[CupCarbon ERROR] (S"+sensor.getId()+"): Condition > ("+arg2+" is not a number)"); //OK
}

[Questions] Project > Start Server

@bounceur, this really is a cool project! I have some questions:

  1. Under Project > Start Server, where can I find documentation about this?
  2. Is there a way to alter any behavior while the simulation is running, like sending a message over socket or MQTT?
  3. How to render the map in 3D?

could not find mainclass error

me and my peers were trying to run cupcarbon in our gnu/linux distros.
While the cupcarbon.jar file worked smoothly in ubuntu. it did not for other distros

i ran: java -jar cupcarbon.jar

Error: Could not find or load main class cupcarbon.CupCarbon

came. i retried by adding -cp option. same error occurs. what shall i do to make it work.
or
shall i download this repo and compile ? if so, it would be great to have a documentation for that - will be helpful for new java users like me.

Passing parameter to a function still needs $ symbol

It seems that the call to a function, i.e.

set d 10
res function myf d

using CupCarbon v5, still requires $ symbol to extract value.
In this example the function myf() receives the value "d", not 10.

Instead, if i use
set d 10
res function myf $d

the function myf() correctly receives the value 10.

Wanted to know IOT simulation specs

I was working on an IOT application in relation to heat exchanger.
I went through your simulation using CupCarbon.
wanted to know more about what -
sensors it can simulate - (Pressure, Temperature, Acidity, Salinity, etc..........)
protocols it supports
Is it licensed or costly and if it costs then how much?

Natural Event Generator

When creating the numbers with the gaussian distribution with a period of 1mn it set the time between the numbers to 60 instead of 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.