ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 05-10-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default system console problem ?

Time: 0.000000. The label referenced at rank 18 does not exist on (null)
Time: 0.000000. The label referenced at rank 21 does not exist on (null)
Table Error: The table named was referenced but does not exist
Time: 0.000000. The label referenced at rank 18 does not exist on (null)
Time: 0.000000. The label referenced at rank 21 does not exist on (null)
Table Error: The table named was referenced but does not exist
Time: 0.000000. The label referenced at rank 18 does not exist on (null)
Time: 0.000000. The label referenced at rank 21 does not exist on (null)

system console print these message ,but it does not tell me which table does not exist,what name of the table, the same to the label.

i think 5.0 can not Compatible with some error,if there are some error,the flexsim can not open, system console it will continuously print message,then flexsim will self-closing.
  #2  
Old 05-10-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

for example i write code like this : string rolling_table=getlabelstr(item,L_MillingID);
next_ingot_width = gettablenum(rolling_table,rolling_count,COL_RT_Ing otWidth);

if i do not run model,there are not item, so the system console tell me "The table named was referenced but does not exist"
the item label is also like that.
perhap i can add code like these: if(objectexists(item)) then .......;
but in 4.52 ,it works very well, it can compatible with these error,buet 5.0 system console it will continuously print message,then flexsim will self-closing.
  #3  
Old 06-03-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default how to deal with these "system console problem"

system console print these message

exception: Exception Caught in FlexsimObject::OnMessage(fsnode *fromobject, double par1, double par2, double par3) object: /VisualTool12/Cold_bed_part/Cold_bed2
exception: Exception Caught in ObjectFunction211__project_library_FlexsimObject_b ehaviour_eventfunctions_OnMessage object: /VisualTool12/Cold_bed_part/Cold_bed2 class: MAIN:/project/library/FlexsimObject
Time: 0.000000. The label referenced at rank 10 does not exist on (null)
exception: Exception Caught in FlexsimObject::OnMessage(fsnode *fromobject, double par1, double par2, double par3) object: /VisualTool12/Cold_bed_part/Cold_bed1
exception: Exception Caught in ObjectFunction211__project_library_FlexsimObject_b ehaviour_eventfunctions_OnMessage object: /VisualTool12/Cold_bed_part/Cold_bed1 class: MAIN:/project/library/FlexsimObject
Time: 0.000000. The label referenced at rank 10 does not exist on (null)
exception: Exception Caught in FlexsimObject::OnMessage(fsnode *fromobject, double par1, double par2, double par3) object: /VisualTool12/Cold_bed_part/Cold_bed2
  #4  
Old 06-03-2010
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

Version 5.0 is much stricter on the use of commands with the typechecking etc. So that is probably why things do work in 4.52 but not in 5.0.

Where do you right the code with the tabel errors? the same with onmessage errors, appearantly you have an on reset or something and maybe you use sendmessage instead of senddelayedmessage?

Anyway they are all errors that are introduced by you so you have to solve them
  #5  
Old 06-03-2010
Lars-Olof Leven Lars-Olof Leven is offline
Flexsim Distributor
 
Join Date: Aug 2007
Location: Sweden, Borlnge
Posts: 312
Downloads: 278
Uploads: 2
Thanks: 300
Thanked 256 Times in 139 Posts
Rep Power: 330
Lars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to behold
Default

Hi,

If you want to have more help you need to upload the model, without the model it is almost impossibly to find out what the problem is.

Lars-Olof
  #6  
Old 06-03-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

i find the problem, in custom draw code i write code like these:
if(getlabelnum(first(current),L_Temperature)<getla belnum(current,"Exit_tem"))//&&xloc(first(current))>=xsize(current)-xsize(first(current)))
{
moveobject(first(current),outobject(current,1),0
sendmessage(current,NULL,3,0,0);
}
because at time 0,these is not item ,so can not get the label of item
so i change code like these

if(objectexists(first(current))&&getlabelnum(first (current),L_Temperature)<getlabelnum(current,"Exit _tem"))
{
moveobject(first(current),outobject(current,1),0
sendmessage(current,NULL,3,0,0);
}

so the problem is solved
  #7  
Old 06-04-2010
RalfGruber's Avatar
RalfGruber RalfGruber is offline
FlexSim Software Products
 
Join Date: Jul 2007
Location: Orem, UT, USA
Posts: 195
Downloads: 37
Uploads: 0
Thanks: 518
Thanked 294 Times in 124 Posts
Rep Power: 345
RalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to behold
Default

Linweixu,

you should NEVER do simulation run manipulation in Custom Draw triggers!!!
This trigger is fired with any screen refresh but screen refresh rate is based on your system performance. You will see different simulation run results with different simulation run speeds just because you have less screen refreshes with higher speeds. Beside this, this trigger doesn´t fire when you close the animation view...
The custom draw trigger should only be used for visualization purpose but not to change model behaviour during a simulation run.

Good luck

Ralf
Flexsim Germany
The Following 4 Users Say Thank You to RalfGruber For This Useful Post:
Tom David (06-06-2010)
  #8  
Old 06-06-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

thank you RalfGruber, thank you for your reminding . i know a little property
of the Custom Draw triggers. in the download area,the X_Hot_Rolling_Mill example use "Custom Draw triggers" in Mill1.

in my model , the temperature of item(Ingot) change with the time ,not the event , so i use "Custom Draw triggers" to do this. i think using user event with litte(0.1s) repeat event time or senddelaymessage with litte(0.1s) repeat event time are not better ways.
Do you have a better way to do this? thank you very much.
  #9  
Old 06-07-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

i think how Custom Draw triggers to fire should set at system parameter , in extendsim , you can use continuous simulation library in discrete system simulation, continuous simulation block do not creat event , but it can interacting control with discrete block. but flexsim do not have continuous simulation library (in extendsim call value library). the value library just do continuous numerical calculation.
so i think we can use Custom Draw triggers to do continuous numerical calculation, but the Frequency of Custom Draw triggers is changing ,so setting the Frequency is very important to do continuous numerical calculation.
If any mistakes exists in the my view, please offer criticism and correct it.
  #10  
Old 06-07-2010
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

Do you NOT know, that there is a fluid library included in Flexsim …
If you open the library grid, there is the Discrete Objects Library. Use the arrow to switch to Fluid Objects Library. In this library are also objects to convert ItemToFluid and FluidToItem.
I do not know extendsim, but I guess both libraries use the same technology. In Flexsim it is solved by a tick time using the object TheTicker which is automatically placed if you use a fluid object.

I agree with Ralf, that you should not use the Custom Draw trigger for simulation run manipulation.
I used it once to visualize a continuous flow on a conveyor, but also took care that an event was fired if the continuous flow reached the end of the conveyor. So if there was no view open or the run speed was fast the trigger OnMessage was fired because I send a delayed message if the flow reached the end of the conveyor.
If you take care that you have your needed/important events, I guess you can still use the OnDraw trigger and do not need to send a delayed message very often (like a ticker).

For your item (ingot) task, I see different solutions, but unfortunately some of them are really advanced functionalities.
One easy solution could be that you use the creation date of an item and if the item enters other objects, you could us the triggers to update the temperature.
Another solution could be to use an OnDrawTrigger on the item to change the information.

I remember an advanced training class, where an item changed the color over the time. If I remember right, Anthony Johnson built this model. I looked for the model and I found it. I updated the model to v5.02 and put it into the Support Section in the Download Area.

Support_FlowitemOnDrawColorChange_TD
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
The Following User Says Thank You to Tom David For This Useful Post:
Lars-Olof Leven (06-07-2010)
  #11  
Old 06-07-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

thank you very much tom , i know a fluid library in flexsim , in extendsim there is a Rate library that like flexsim fluid library , the value library is very different with Rate library (flexsim fluid library),the Rate library (flexsim fluid library) is for something like fluid not for value(equal
steps and model values are recalculated at each time step).

there is something which introduced in extendsim

Discrete rate modeling is based on rates of flow that change when events occur. In a discrete rate
system, quantities of “flow” (material, product, data, etc.) are located in one or more parts of the
model. During the simulation run, the flow moves from one location to another at a certain speed,
called the effective rate. The movement between blocks that hold or route the flow follows paths,
rules, and constraints that are set in the model.



The Continuous Modeling module is focused on building models where time advances in equal
steps and model values are recalculated at each time step. It is also a helpful reference if you use
continuous blocks in discrete event and discrete rate models.
  #12  
Old 06-07-2010
RalfGruber's Avatar
RalfGruber RalfGruber is offline
FlexSim Software Products
 
Join Date: Jul 2007
Location: Orem, UT, USA
Posts: 195
Downloads: 37
Uploads: 0
Thanks: 518
Thanked 294 Times in 124 Posts
Rep Power: 345
RalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to behold
Default

Linweixu,

to come back to your problem: What does the change of temperature over time effect? Do you want to create an event, after a specific temperatur has been hit? If so, you would need to calculate the time it takes to reach that temperature OnEntry and send a delayed message to hit the point, when the temperature was reached.

Let us know, what you need the temperature for.

Good luck.

Ralf
Flexsim Germany
  #13  
Old 06-07-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

In metallurgical industry,there is a equiment that called cold bed, It is used for cooling Ingot , the temperature of Ingot which will entry cold bed is different,the temperature of Ingot change with temperature model ,the temperature model has relationship with the time, thickness of Ingot and so on. my customer want to display every the temperature of Ingots in the cold bed in the model. If the temperature falls below a certain value, move out the Ingots from cold bed.

thanks Ralf
  #14  
Old 06-08-2010
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

Make a mathematical function of temperature versus time. Calculate at what time the temperature is below and create a message at that time to move the ingot out of the coldbed.

Use the ondraw to call the function everytime and get the temperature and show a graph that way.

With this solution if you shut down your views your model still works correct and fast.
The Following 4 Users Say Thank You to Steven Hamoen For This Useful Post:
RalfGruber (06-08-2010)
  #15  
Old 06-12-2010
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

You asked me offline how you'd model synchronous 'tick-based' processes for interrelated continuous variables but without using the fluid library, which has a strong element of 'fluid' related fields.

The attached model has a CustomTicker object which calls two label functions on all the objects - one to evaluate the conditions, and the next to set the value. I can imagine you could use the same technique with small enough intervals to approximate other continuous systems.

The events occur in the behaviour nodes of the CustomTicker: - OnTimerEvent and OnReset. I've used a user eventcode 101 to ensure it doesn't interfere with other Flexsim events for the object (messages etc..)

In the example if you want to set a cell to be alive at the start set the 'initiallyalive' variable to 1 (or copy it to a selection from the red cell on the left). I'm using the centerport to define an object's relationship to its neighbours and initially I was connecting the cells by hand which is why I draw the number of centerport connections when time()==0
Attached Files
File Type: zip SynchronousLife_CellAutomata.zip (94.4 KB, 190 views)
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
Tom David (06-14-2010)
  #16  
Old 06-18-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default click item problem

when i click item,the system console prints
"
Exception caught in createundorecordbase(). Throwing...
Exception caught in createundorecord() undocode 2"
i do not know why and what cause that.
perhaps it have relationship with buildall(),because after i add this code ,then the system console prints.but i del the code ,problem continue
createundorecord is a new one in flexsim 5.02
i do not use them in my model.

Last edited by LINWEIXU; 06-18-2010 at 02:15 AM.
  #17  
Old 06-18-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

i find that i click all object,the system console print that message
and i find the reason, because i add OnDraw at active/persp. if i del the OnDraw node , then ok .but i also do not know why .
ondraw code is

treenode ObjectTracking = rankobj(c, contentobj(c)-1);
treenode item = tonode(getnodenum(first(ObjectTracking)));
if(objectexists(item))
{
double rotation = getnodenum(rank(ObjectTracking, 3));
double xoffset = getnodenum(rank(ObjectTracking, 5));
double yoffset = getnodenum(rank(ObjectTracking, 6));
treenode view = c;
double x = vectorprojectx(item,0,0,0,model());
double y = vectorprojecty(item,0,0,0,model());
//double z = vectorprojectz(item,0,0,0,model());
set(viewpointx(view),x+xoffset);
set(viewpointy(view),y-yoffset);
//set(viewpointz(view),z+zoffset);
if(rotation==0)
rotation = zrot(item);
set(viewpointrz(view), rotation-270);
}
return 0;

which is wrote by tom.


Thread Thread Starter Forum Replies Last Post
Custom Console Phil BoBo User Development 6 12-12-2011 04:19 AM
Can I write to the system console? Steven Hamoen Q&A 2 11-26-2008 06:37 AM
Concept Training System Brandon Peterson User Development 0 11-14-2008 12:02 PM
Print information into output console (Debugging) Tom David Q&A 11 09-04-2008 03:46 AM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.