Node com.nodelab.interest.YieldPoints

com.nodelab.0.10388
Instance of TypeScriptInfo

Node dataValue
org.edgescript.TypeScriptInfo.prerequisiteParcelsList{}
org.edgescript.TypeScriptInfo.prerequisiteMethodsList{}
org.edgescript.TypeScriptInfo.script/* instance Collection[Int] dayList; instance Collection[Real] modifiers; constructor() { View:(); instance dayList = #(30, 60, 90, 120, 150, 180, 270, 360, 540, 720, 1080, 1400, 1800, 2200, 2600, 3000, 3600); instance modifiers = #(0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.17, 0.20, 0.20, 0.20, 0.20, 0.20, 0.20, 0.20, 0.20, 0.20, 0.20); } class Boolean isResourceOf(Listable node, Symbol aspect) { if (aspect == #views) return true; false; } class String resourceLabel() "Name of resource" { "yield points"; } introspect Collection[Class] requiredConditions() { #(ConditionHistory); } Void designView(WidgetWorkspace ws) { Yield yield = Yield{partAt(0).source}; if (yield == null' '!(yield.class.subclassOf(Yield))) { Producer.report("First part must be a yield"); return null; } ws.addHeader(new Place(0, 0).setPrefSize(0, 20), this); Array2D[Object] array = new Array2D(Number, 4, instance dayList.size); 0 .to(instance dayList.size - 1, trace Void(Int i) { Int days = instance dayList.at(i); external cond_maturity = days / 360; Real value = yield.aspectReal(#value); Real mod = instance modifiers.at(i); array.set(0, i, days); array.set(1, i, value); array.set(2, i, mod); array.set(3, i, value + mod); }); ws.addTable(new Place(0, 1).setWeight(1.0, 1.0, #both).setPadding(20, 4), array, #("Days", "Yield", "Mod", "Total"), true); ws.addGigInfo(new Place(0, 2).setPrefSize(0, 16).setFill(#horizontal), gig()); } */
org.edgescript.TypeScriptInfo.defineTypecom.nodelab.interest.YieldPoints
org.edgescript.TypeScriptInfo.prerequisiteScriptsList{}