Answered
Schedule Timeout Block workaround
AFAIK You cannot implement it by SImEvent's default blocks. What you need is a customized FIFO queue and is only possible using ...

5 years ago | 0

Answered
Using Entities to add resources to a Resource Pool in SimEvents
This can be done via a Simulink function block. You should also set some of the properties of the resource pool. Find the attach...

5 years ago | 0

Answered
contourf with more colours
This works for both contour and contourf. You can either tell MATLAB how many levels you want. contour (X,Y,Z, levels); If le...

5 years ago | 1

Answered
Allocating Resource ID for the resources in Simevents
I was unable to run your model, but according to your post, I think you need to calculate the distance of the orders to the oper...

5 years ago | 1

| accepted

Answered
need solution asap for my hw about summing each character in student number that we input the data
num = input('enter your student number here : '); NumChar = num2str (num); MySum = 0; for i1 = 1:numel (NumChar) MySum =...

5 years ago | 0

| accepted

Answered
Generate a vector under norm condition
I don't know of any nice functions to do that in one shot, but I think you can start with a random point and use a solver to opt...

5 years ago | 0

Answered
FInd the function root
Finding values of inputs that minimizes or maximizes an objective function is an optimizaiton problem. I don't know about your f...

5 years ago | 1

Answered
how can i use for loop to solve the below problem
You have used an extra end. Delete the end in the last line. I think you must use hold on before your for loop and place the if ...

5 years ago | 0

| accepted

Answered
How to extract last non-zero element above current row in same column?
I think the best way is find as you mentioned. for i1 = 1:numel(X) if any ([isnan(X(i1)); X(i1)==0]) idx = find ...

5 years ago | 0

| accepted

Answered
How to find max and min value of a function ?
Finding the value of inputs that minimzes or maximizes the objective function value is an optimization problem. If your function...

5 years ago | 1

Answered
nested for loop for 2d matrix cell
I think the problem lies here CUT = RDM(i,j); if (CUT < threshold{o}) You said that RDM is a cell matrix; so CUT is also a c...

5 years ago | 0

Answered
In SimEvents, how can I block "plants" that are occupied so that the batch uses another plant?
The best option here is the entity output switch block. Each plant is connected to a port of this block. There are several optio...

5 years ago | 0

| accepted

Answered
How do you read an attribute from one part of a composite entity
Composite entities retain the hierarchical structure of the constituent entities. There are two ways: (1) Directly method. If...

5 years ago | 1

| accepted

Question


SimEvents: What is the correct usage of testEntry?
I really like the MATLAB Discrete-Event System (MDES) block in SimEvents library. I found it very flexible yet simple to work wi...

5 years ago | 1 answer | 0

1

answer

Answered
Hi I'm new to Matlab and was trying to plot a graph of 2^n but havn't been able to.
For example for the range [-5,5] x = linspace (-5,5,101); y = 2 .^ x; plot (x,y);

5 years ago | 0

| accepted

Answered
Find a mean value for specific rows?
To find the mean for specific rows of matrix A: MyMean = mean (A(:,(100:120)),2);

5 years ago | 0

| accepted

Question


readmatrix for single Excel cells
My data is stored on a single Excel file, where each sheet containts several numeric matrixes. I imported all the variables succ...

6 years ago | 1 answer | 1

1

answer

Question


SimEvents: Why do I get the error "undefined function or variable 'out1'" in testEntry method?
I have modeled a simple server that encounters failure. I want the testEntry method to close the gate of Storage1, when the Fail...

6 years ago | 1 answer | 0

1

answer

Question


SimEvents: Which entity type should event actions be assigned to? Invoker type or target type?
Event actions of MATLAB discrete-event system should be named according to this rule: entityType + eventAction. The rule is rath...

6 years ago | 1 answer | 0

1

answer

Answered
How to create bus object within MATLAB discrete-event system, without having to load it in workspace?
My question is that can I generate entities and attributes (bus objects) with DES block without predefining them in the base wor...

6 years ago | 0

Question


How to create bus object within MATLAB discrete-event system, without having to load it in workspace?
I know that in MATLAB discrete-event system blocks, the entities are bus objects and I know that I can create bus objects in the...

6 years ago | 2 answers | 0

2

answers

Question


Is there more documentation or examples on SimEvents observer?
SimEvents has an interesting feature named "Observer" which is used to create custom visualizations for SimEvents blocks. Althou...

6 years ago | 1 answer | 0

1

answer

Question


Simevents: change the server capacity during simulation
I know that server capacity and initial resource amount can not be changed during simulation (the question has been asked before...

6 years ago | 1 answer | 0

1

answer

Question


Simevents discrete-event system documentation does not include some of variable-input syntaxes
I noticed that in this example, the WheelEntry method invokes an eventIterate action with just 2 inputs and works just fine, but...

6 years ago | 1 answer | 0

1

answer

Question


SimEvents: Is it possible to generate an event-based entity with specific attribute values defined in the caller block's event action?
For example consider Simevents' example for event-based entity generation: The Entity Terminator block calls the simulink fun...

6 years ago | 1 answer | 0

1

answer

Answered
Where can I find Enumeration values in Simulink
I had the same problem. With trial and error with different blocks and plotting the results, I found out the following: 0 No...

6 years ago | 0

Question


Why fmincon's interior-point algorithm gives infeasible points for feasibility problem?
I am creating an initial feasible population for my optimization problem along the lines of this. I tried the technique with dif...

6 years ago | 0 answers | 0

0

answers

Answered
How to create random seed to have different results at each simevents run???
There is a block named 'Random Integer Number' or something like this that can produce different seed for your iterations even w...

6 years ago | 0

Answered
Function behaves normally except when being called by another function
Sorry dpb, it was my fault. The fitness function is called more than one time in the main algorithm, the last of which passes a ...

6 years ago | 0

Question


Function behaves normally except when being called by another function
I am writing a code to evaluate the fitness function for evolutionary optimization purposes. The fitness function for the feasib...

6 years ago | 1 answer | 0

1

answer