Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Error of assignment when generating simulink model (Assigning to 0 elements using a simple assignment statement is not supported. Consider using comma-separated list assignment.)
Error of assignment when generating simulink model [message #1851130] Mon, 28 March 2022 13:25 Go to next message
Abdelgafar  Elkhaoui is currently offline Abdelgafar ElkhaouiFriend
Messages: 5
Registered: January 2022
Junior Member
I really can't see what's wrong here, I would appreciate if someone can see what's wrong and led to the error in the assignment

var PulseGenerator1 = new `simulink/Sources/Pulse Generator`;

var scope = new `simulink/Sinks/Scope`;

//var DoorMF = new `simulink/Sinks/Scope`;
var If = new `simulink/Ports & Subsystems/If`;

var Ifaction = new `simulink/Ports & Subsystems/If Action Subsystem`;

var Ifactiontwo = new `simulink/Ports & Subsystems/If Action Subsystem`;

var sensor = new `simulink/User-Defined Functions/MATLAB Function`;

var UnitDelay = new `simulink/Discrete/Unit Delay`;

var Door = new `fuzblock/Membership Functions/Trapezoidal MF`;



//assert(SubSystem.all.size() = 1);

Door.name = "door_sensor";
//assert(sensor.name = "door_sensor");

Door.script = "function y = door_sensor(u) \\n y = u;";
//assert(sensor.script = "function y = fcn(x) \n y = u;");


PulseGenerator1.position = "[125 174 155 206]";
assert(PulseGenerator1.position.at(0) = 125);
assert(PulseGenerator1.position.at(1) = 174);
assert(PulseGenerator1.position.at(2) = 155);
assert(PulseGenerator1.position.at(3) = 206);

scope.position = "[260 69 290 101]";
assert(scope.position.at(0) = 260);
assert(scope.position.at(1) = 69);
assert(scope.position.at(2) = 290);
assert(scope.position.at(3) = 101);

If.position = "[630 176 725 234]";
assert(If.position.at(0) = 630);
assert(If.position.at(1) = 176);
assert(If.position.at(2) = 725);
assert(If.position.at(3) = 234);

Ifaction.position = "[760 122 830 158]";
assert(Ifaction.position.at(0) = 760);
assert(Ifaction.position.at(1) = 122);
assert(Ifaction.position.at(2) = 830);
assert(Ifaction.position.at(3) = 158);

Ifactiontwo.position = "[755 252 825 288]";
assert(Ifactiontwo.position.at(0) = 755);
assert(Ifactiontwo.position.at(1) = 252);
assert(Ifactiontwo.position.at(2) = 825);
assert(Ifactiontwo.position.at(3) = 288);

UnitDelay.position = "[525 203 560 237]";
assert(UnitDelay.position.at(0) = 525);
assert(UnitDelay.position.at(1) = 203);
assert(UnitDelay.position.at(2) = 560);
assert(UnitDelay.position.at(3) = 237);

Door.position = "[410 166 455 214]";
assert(Door.position.at(0) = 410);
assert(Door.position.at(1) = 166);
assert(Door.position.at(2) = 455);
assert(Door.position.at(3) = 214);

sensor.position = "[220 154 370 226]";
assert(sensor.position.at(0) = 220);
assert(sensor.position.at(1) = 154);
assert(sensor.position.at(2) = 370);
assert(sensor.position.at(3) = 226);


UnitDelay.UnitDelay = 1;

If.Inputs = 2;
//If.Outputs = "2";
//If.outputs = 2;

// Link them

PulseGenerator1.link(sensor);
PulseGenerator1.linkTo(scope);
sensor.link(Door);
Door.link(UnitDelay);
Door.link(If, 1);
UnitDelay.linkTo(If, 2);
If.link(Ifaction);
If.linkTo(Ifactiontwo);
Re: Error of assignment when generating simulink model [message #1851152 is a reply to message #1851130] Tue, 29 March 2022 08:04 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Abdelgafar,

Could you please try to trim down your program to the bare minimum statements you need to demonstrate the issue you are encountering as discussed in [1]?

Thanks,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/#a-minimal-version
Re: Error of assignment when generating simulink model [message #1851160 is a reply to message #1851152] Tue, 29 March 2022 10:04 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi again,

If you need to embed code in future messages, please use a code environment (last tool in the formatting toolbar) for better readability and to avoid auto-formatting issues (e.g. automatic replacement of double spaces with single spaces, which seems to be the case in Membership Functions). Also please avoid using the "topic description" field and include your full message in the body of the post.

Best,
Dimitris
Previous Topic:Transforming eol file to a simulink model using fuzzy logic blocks
Next Topic:EolDoc - Using annotations to generate documentation
Goto Forum:
  


Current Time: Fri Apr 26 01:00:54 GMT 2024

Powered by FUDForum. Page generated in 0.02748 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top