Skip to content

Commit 7164558

Browse files
committed
Rebuild docs.
1 parent 558b124 commit 7164558

11 files changed

+186
-178
lines changed

docs/api/main.md

+44-37
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ See [IdealDiode](../lib/index.html#IdealDiode) and
3737
[Limiter](../lib/index.html#Limiter) in the standard library.
3838

3939

40-
[Sims/src/main.jl:1167](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L1167)
40+
[Sims/src/main.jl:1163](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L1163)
4141

4242

4343

@@ -89,7 +89,7 @@ function Resistor(n1::ElectricalNode, n2::ElectricalNode, R::Signal)
8989
end
9090
```
9191

92-
[Sims/src/main.jl:766](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L766)
92+
[Sims/src/main.jl:760](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L760)
9393

9494

9595

@@ -130,7 +130,7 @@ end
130130
y = sim(test_BoolEventHook())
131131
```
132132

133-
[Sims/src/main.jl:998](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L998)
133+
[Sims/src/main.jl:992](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L992)
134134

135135

136136

@@ -168,7 +168,7 @@ b = Unknown([1., 0.])
168168
y = Unknown(compatible_values(a,b)) # Initialized to [0.0, 0.0].
169169
```
170170

171-
[Sims/src/main.jl:639](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L639)
171+
[Sims/src/main.jl:633](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L633)
172172

173173

174174

@@ -193,7 +193,7 @@ delay(x::Unknown, val)
193193
* `::MExpr` : a delayed Unknown
194194

195195

196-
[Sims/src/main.jl:877](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L877)
196+
[Sims/src/main.jl:871](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L871)
197197

198198

199199

@@ -218,7 +218,7 @@ a = Unknown()
218218
der(a) + 1
219219
```
220220

221-
[Sims/src/main.jl:294](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L294)
221+
[Sims/src/main.jl:287](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L287)
222222

223223

224224

@@ -251,15 +251,15 @@ See [DeadZone](../lib/index.html#DeadZone) and
251251
[Limiter](../lib/index.html#Limiter) in the standard library.
252252

253253

254-
[Sims/src/main.jl:1210](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L1210)
254+
[Sims/src/main.jl:1206](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L1206)
255255

256256

257257

258258
## is_unknown
259259

260260
Is the object an UnknownVariable?
261261

262-
[Sims/src/main.jl:245](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L245)
262+
[Sims/src/main.jl:237](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L237)
263263

264264

265265

@@ -293,7 +293,7 @@ typeof(d)
293293
myfun(x) = mexpr(:call, :myfun, x)
294294
```
295295

296-
[Sims/src/main.jl:354](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L354)
296+
[Sims/src/main.jl:347](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L347)
297297

298298

299299

@@ -321,7 +321,7 @@ a = Unknown("var1")
321321
name(a)
322322
```
323323

324-
[Sims/src/main.jl:599](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L599)
324+
[Sims/src/main.jl:593](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L593)
325325

326326

327327

@@ -344,7 +344,7 @@ pre(x::DiscreteVar)
344344
* A value stored just prior to an event.
345345

346346

347-
[Sims/src/main.jl:1024](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L1024)
347+
[Sims/src/main.jl:1018](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L1018)
348348

349349

350350

@@ -387,7 +387,7 @@ end
387387
See also [IdealThyristor](../lib/index.html#IdealThyristor) in the standard library.
388388

389389

390-
[Sims/src/main.jl:1118](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L1118)
390+
[Sims/src/main.jl:1112](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L1112)
391391

392392

393393

@@ -416,7 +416,7 @@ expressions, except to grab an immediate value.
416416
v = Voltage(value(n1) - value(n2))
417417
```
418418

419-
[Sims/src/main.jl:563](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L563)
419+
[Sims/src/main.jl:557](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L557)
420420

421421

422422

@@ -442,15 +442,15 @@ end
442442
dump( Vanderpol() )
443443
```
444444

445-
[Sims/src/main.jl:489](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L489)
445+
[Sims/src/main.jl:483](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L483)
446446

447447

448448

449449
## MTime
450450

451451
The model time - a special unknown variable.
452452

453-
[Sims/src/main.jl:654](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L654)
453+
[Sims/src/main.jl:648](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L648)
454454

455455

456456

@@ -476,7 +476,7 @@ dump( Vanderpol() )
476476
x = sim(Vanderpol(), 50.0)
477477
```
478478

479-
[Sims/src/main.jl:513](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L513)
479+
[Sims/src/main.jl:507](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L507)
480480

481481

482482

@@ -522,15 +522,15 @@ function Vanderpol2()
522522
end
523523
```
524524

525-
[Sims/src/main.jl:1383](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L1383)
525+
[Sims/src/main.jl:1382](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L1382)
526526

527527

528528

529529
## DefaultUnknown
530530

531531
The default UnknownCategory.
532532

533-
[Sims/src/main.jl:152](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L152)
533+
[Sims/src/main.jl:152](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L152)
534534

535535

536536

@@ -552,7 +552,7 @@ der(a) + 1
552552
typeof(der(a))
553553
```
554554

555-
[Sims/src/main.jl:264](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L264)
555+
[Sims/src/main.jl:257](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L257)
556556

557557

558558

@@ -589,15 +589,15 @@ programming). The package
589589
[Reactive.jl](https://github.com/JuliaLang/Reactive.jl) may help here.
590590

591591

592-
[Sims/src/main.jl:921](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L921)
592+
[Sims/src/main.jl:915](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L915)
593593

594594

595595

596596
## DiscreteVar
597597

598598
A helper type used inside of the residual function.
599599

600-
[Sims/src/main.jl:954](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L954)
600+
[Sims/src/main.jl:948](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L948)
601601

602602

603603

@@ -627,7 +627,7 @@ Event(condition::ModelType, pos_response, neg_response)
627627
See [IdealThyristor](../lib/index.html#IdealThyristor) in the standard library.
628628

629629

630-
[Sims/src/main.jl:1052](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L1052)
630+
[Sims/src/main.jl:1046](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L1046)
631631

632632

633633

@@ -638,16 +638,17 @@ and may be broken. There are no tests. The idea is that the equations
638638
provided will only be used during the initial solution.
639639

640640
```julia
641-
InitialEquation(egs)
641+
InitialEquation(eqs)
642642
```
643643

644644
### Arguments
645645

646+
* `x::Unknown` : the quantity to be initialized
646647
* `eqs::Array{Equation}` : a vector of equations, each to be equated
647648
to zero during the initial equation solution.
648649

649650

650-
[Sims/src/main.jl:795](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L795)
651+
[Sims/src/main.jl:790](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L790)
651652

652653

653654

@@ -656,7 +657,7 @@ InitialEquation(egs)
656657
A helper type needed to mark unknowns as left-side variables in
657658
assignments during event responses.
658659

659-
[Sims/src/main.jl:1076](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L1076)
660+
[Sims/src/main.jl:1070](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L1070)
660661

661662

662663

@@ -681,15 +682,15 @@ d = a + sin(b)
681682
typeof(d)
682683
```
683684

684-
[Sims/src/main.jl:321](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L321)
685+
[Sims/src/main.jl:314](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L314)
685686

686687

687688

688689
## ModelType
689690

690691
The main overall abstract type in Sims.
691692

692-
[Sims/src/main.jl:136](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L136)
693+
[Sims/src/main.jl:136](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L136)
693694

694695

695696

@@ -712,7 +713,7 @@ Parameter(value, label::String)
712713
* `label::String` : labeling string, defaults to ""
713714

714715

715-
[Sims/src/main.jl:375](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L375)
716+
[Sims/src/main.jl:368](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L368)
716717

717718

718719

@@ -728,7 +729,7 @@ PassedUnknown(ref::UnknownVariable)
728729

729730
* `ref::UnknownVariable` : an Unknown
730731

731-
[Sims/src/main.jl:821](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L821)
732+
[Sims/src/main.jl:815](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L815)
732733

733734

734735

@@ -789,15 +790,15 @@ function SignalCurrent(n1::ElectricalNode, n2::ElectricalNode, I::Signal)
789790
end
790791
```
791792

792-
[Sims/src/main.jl:713](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L713)
793+
[Sims/src/main.jl:707](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L707)
793794

794795

795796

796797
## RefDiscrete
797798

798799
A helper type for Discretes used in Arrays.
799800

800-
[Sims/src/main.jl:945](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L945)
801+
[Sims/src/main.jl:939](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L939)
801802

802803

803804

@@ -812,7 +813,7 @@ with `getindex`. Defined methods include:
812813
* hcat
813814
* vcat
814815

815-
[Sims/src/main.jl:528](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L528)
816+
[Sims/src/main.jl:522](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L522)
816817

817818

818819

@@ -824,7 +825,8 @@ When the event is triggered, the model is re-flattened after replacing
824825
`default` with `new_relation` in the model.
825826

826827
```julia
827-
StructuralEvent(condition::MExpr, default, new_relation::Function)
828+
StructuralEvent(condition::MExpr, default, new_relation::Function,
829+
pos_response, neg_response)
828830
```
829831

830832
### Arguments
@@ -834,6 +836,11 @@ StructuralEvent(condition::MExpr, default, new_relation::Function)
834836
* `default` : the default Model used
835837
* `new_relation` : a function that returns a model that will replace
836838
the default model when the condition triggers the event.
839+
* `pos_response` : an expression indicating what to do when the
840+
condition crosses zero positively. Defaults to Equation[].
841+
* `neg_response::Model` : an expression indicating what to do when the
842+
condition crosses zero in the negative direction. Defaults to
843+
Equation[].
837844

838845
### Examples
839846

@@ -879,15 +886,15 @@ end
879886
p_y = sim(BreakingPendulum(), 6.0)
880887
```
881888

882-
[Sims/src/main.jl:1289](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L1289)
889+
[Sims/src/main.jl:1291](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L1291)
883890

884891

885892

886893
## UnknownCategory
887894

888895
Categories of Unknown types; used to subtype Unknowns.
889896

890-
[Sims/src/main.jl:147](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L147)
897+
[Sims/src/main.jl:147](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L147)
891898

892899

893900

@@ -896,7 +903,7 @@ Categories of Unknown types; used to subtype Unknowns.
896903
An abstract type for variables to be solved. Examples include Unknown,
897904
DerUnknown, and Parameter.
898905

899-
[Sims/src/main.jl:142](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L142)
906+
[Sims/src/main.jl:142](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L142)
900907

901908

902909

@@ -956,5 +963,5 @@ Unknown{T}(s::Symbol, x)
956963
a * b + b^2
957964
```
958965

959-
[Sims/src/main.jl:210](https://github.com/tshort/Sims.jl/tree/d39a15c1969c6fad87a4a7ab7f25088963690512/src/main.jl#L210)
966+
[Sims/src/main.jl:210](https://github.com/tshort/Sims.jl/tree/558b12477832ec70e2baee9b22bfbfb2b68aae57/src/main.jl#L210)
960967

0 commit comments

Comments
 (0)