-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method is a responsibility of Master, not Slave #1
Comments
You can run several slaves. Tell the master about the number of slaves you want to run (-n cli parameter). If you don't specify it then the master immediately runs the simulation as soon as the slave connects to it. If -n is specified the master waits for the all slaves to connect and then starts the simulation. |
Alright... But how do the master know what method it should run? Is it possible at all to have interconnected slaves? |
The master calls the methods as specified in the FMI specification. In the following order, I don't see any use of exposing these methods from a slave to master since each slave should have these methods. Even if we expose them still they are going to be same for each slave. So it is not required. |
No, the slaves are never interconnected. They should communicate via master. |
Gotcha. Let me reformulate the second question. Is it possible to have interconnected Slaves via the Master? In this case, the Master exchanges information between the slaves (Master calls getReal for SlaveA and then setReal for SlaveB). |
Yes and this is what exactly happening in the current code. The connection information we pass to master handles this e.g, Pass the master following argument, Then the master calls the getReal value reference 0 of slave1 and pass it to slave0 value reference 0 using setReal. |
Alright! I'm slowly grasping the code structure now... As I understand it, all connections must be resolved before the master can run doStep for a slave. The Master tries to resolve all the connections and then step the slaves, right? What if I want to switch to a sequential resolve & step, is that possible? Below are the loose coupling algorithms we have worked with (pseudo code). Which one is being used by this master?
Can I switch between the two by passing the |
Hi @adeas31,
Currently the slave gets instructions on what method to use, but this should be handled by the master.
Each slave provides one FMU, and exposes variables and a few methods to the Master.
The Master knows of all connected slaves, and in what order they should run doStep(). The step order is the method: sequential stepping of slaves (Jacobi), and parallel stepping of slaves (Gauss-Seidel).
This fix is needed for running several slaves, but the current code is OK for one slave.
Not sure if I can get time over to fix this, or if it is required for the workshop, but will check.
The text was updated successfully, but these errors were encountered: