This commit is contained in:
2024-02-22 20:58:47 -06:00
parent dea448e46b
commit 2a71914ed8
9 changed files with 571 additions and 0 deletions

26
tmp/t.lua Normal file
View File

@@ -0,0 +1,26 @@
local k = require("kiwi")
s = k.Solver()
--s:set_error_mask({ "KiwiErrUnknownEditVariable" }, false)
local v1 = k.Var("v1")
local v2 = k.Var("v2")
local v3 = k.Var("v3")
local v4 = k.Var("v4")
print((2 * v1 - 5 * v2))
os.exit()
local c1 = k.constraints.pair_ratio(v1, -4, v2, 22, "GE", 1000)
local c2 = k.constraints.pair_ratio(v3, -6, v4, 29, "LE", 1000)
local vo = c1:expression():terms()[1].var
print(v1 == vo)
-- print(v1:name())
-- print(v1 * 5)
local e = k.Expression(6, k.Term(v1, 2), k.Term(v2, 3))
--print(e)
--print(k.strength.MEDIUM)