Evolution of Components
Reading Time
Jusdl.Components.ComponentsBase.readtime — Functionreadtime(comp::AbstractComponent)Returns current time of comp read from its trigger link.
To read time of comp, comp must be launched. See also: launch(comp::AbstractComponent).
Reading State
Jusdl.Components.ComponentsBase.readstate — Functionreadstate(comp::AbstractComponent)Returns the state of comp if comp is AbstractDynamicSystem. Otherwise, returns nothing.
Reading Input
Jusdl.Components.ComponentsBase.readinput — Functionreadinput(comp::AbstractComponent)Returns the input value of comp if the input of comp is Bus. Otherwise, returns nothing.
To read input value of comp, comp must be launched. See also: launch(comp::AbstractComponent)
Writing Output
Jusdl.Components.ComponentsBase.writeoutput — Functionwriteoutput(comp::AbstractComponent, out)Writes out to the output of comp if the output of comp is Bus. Otherwise, does nothing.
Computing Output
Jusdl.Components.ComponentsBase.computeoutput — Functioncomputeoutput(comp, x, u, t)Computes the output of comp according to its outputfunc if outputfunc is not nothing. Otherwise, nothing is done. x is the state, u is the value of input, t is the time.
Evolve
Jusdl.Components.ComponentsBase.evolve! — Functionevolve!(comp::AbstractSource, u, t)Does nothing. u is the value of input and t is time.
evolve!(comp::AbstractSink, u, t)Writes t to time buffer timebuf and u to databuf of comp. u is the value of input and t is time.
evolve!(comp::AbstractStaticSystem, u, t)Writes u to buffer of comp if comp is an AbstractMemory. Otherwise, nothing is done. u is the value of input and t is time.
evolve!(comp::AbstractDynamicSystem, u, t)Solves the differential equation of the system of comp for the time interval (comp.t, t) for the inital condition x where x is the current state of comp . u is the input function defined for (comp.t, t). The comp is updated with the computed state and time t.
Taking Steps
Jusdl.Components.ComponentsBase.takestep — Functiontakestep(comp::AbstractComponent)Reads the time t from the trigger link of comp. If comp is an AbstractMemory, a backward step is taken. Otherwise, a forward step is taken. See also: forwardstep, backwardstep.
takestep(comp::AbstractSubSystem)Makes comp to take a step by making each subcomponent of comp take a step. See also: takestep(comp::AbstractComponent)
Jusdl.Components.ComponentsBase.forwardstep — Functionforwardstep(comp, t)Makes comp takes a forward step. The input value u and state x of comp are read. Using x, u and time t, comp is evolved. The output y of comp is computed and written into the output bus of comp.
Jusdl.Components.ComponentsBase.backwardstep — Functionbackwardstep(comp, t)Reads the state x. Using the time t and x, computes and writes the ouput value y of comp. Then, the input value u is read and comp is evolved.
Jusdl.Connections.launch — Methodlaunch(comp::AbstractComponent)Returns a tuple of tasks so that trigger link and output bus of comp is drivable. When launched, comp is ready to be driven from its trigger link. See also: drive(comp::AbstractComponent, t)
Jusdl.Connections.launch — Methodlaunch(comp::AbstractSubSystem)Launches all subcomponents of comp. See also: launch(comp::AbstractComponent)
Jusdl.Components.ComponentsBase.drive — Functiondrive(comp::AbstractComponent, t)Writes t to the trigger link of comp. When driven, comp takes a step. See also: takestep(comp::AbstractComponent)
drive(comp::AbstractSubSystem, t)Drives comp by driving each subcomponent of comp. See also: drive(comp::AbstractComponent, t)
Jusdl.Components.ComponentsBase.approve — Functionapprove(comp::AbstractComponent)Read handshake link of comp. When not approved or false is read from the handshake link, the task launched for the trigger link of comp gets stuck during comp is taking step.
approve(comp::AbstractSubSystem)Approves comp by approving each subcomponent of comp. See also: approve(comp::AbstractComponent)
Jusdl.Connections.release — Methodrelease(comp::AbstractComponent)Releases the input and output bus of comp.
Jusdl.Connections.release — Methodrelease(comp::AbstractSubSystem)Releases comp by releasing each subcomponent of comp. See also: release(comp::AbstractComponent)
Jusdl.Components.ComponentsBase.terminate — Functionterminate(model::Model)Terminates model by terminating all the components of the model, i.e., the components tasks in the task manager of the model is terminated. See also: ComponentTask, TaskManager.
terminate(comp::AbstractComponent)Closes the trigger link and output bus of comp.
terminate(comp::AbstractSubSystem)Terminates comp by terminating each subcomponent of comp. See also: terminate(comp::AbstractComponent)