Author .......: Kurt Pagani
-- Date .........: Sun Jun 17 02:14:10 CEST 2018
fricas
)set break resume
fricas
)expose UnittestCount UnittestAux Unittest
UnittestCount is now explicitly exposed in frame initial
UnittestAux is now explicitly exposed in frame initial
Unittest is now explicitly exposed in frame initial
--)co linprog
fricas
)expose LINPROG
LinearProgramming is already explicitly exposed in frame initial
-- Test Suite
testsuite "Package: LinearProgramming"
All user variables and function definitions have been cleared.
WARNING: string for testsuite should have less than 15 characters!
Type: Void
fricas
-- Cases
testcase "revisedSimplex"
All user variables and function definitions have been cleared.
Type: Void
fricas
-- testEquals("", "")
A:=matrix [[0.7,1.0,1.0,0.0,0.0,0.0],[0.5,(5/6)::Float,0.0,1.0,0.0,0.0],
[1.0,(2/3)::Float,0.0,0.0,1.0,0.0],[0.1,0.25,0.0,0.0,0.0,1.0]]
Type: Matrix(Float)
fricas
c:=vector [-10.0,-9.0,0.0,0.0,0.0,0.0]
Type: Vector(Float)
fricas
b:=vector [630.0,600.0,708.0,135.0]
Type: Vector(Float)
fricas
B:=[3,4,5,6]
Type: List(PositiveInteger
?)
fricas
X1:Vector Float:= vector [540.0,252.0,0.0,120.0,0.0,18.0]
Type: Vector(Float)
fricas
objVal1:Float:= - 7668.0
Type: Float
fricas
Basis1:List Integer:= [2,4,1,6]
Type: List(Integer)
fricas
eps:=0.0000000001
Type: Float
fricas
floatNull(v:Vector Float):Boolean == sqrt dot(v,v) <= eps
Function declaration floatNull : Vector(Float) -> Boolean has been
added to workspace.
Type: Void
fricas
r1:=revisedSimplex( A, b, c, B)
>> System error:
The value
(0 . 0)
is not of type
UNSIGNED-BYTE
Continuing to read the file...
testEquals("floatNull(r1.X-X1)", "true")
There are no library operations named r1
Use HyperDoc Browse or issue
)what op r1
to learn if there is any operation containing " r1 " in its name.
Cannot find a definition or applicable library operation named r1
with argument type(s)
Variable(X)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("abs(r1.objVal-objVal1)<eps", "true")
There are no library operations named r1
Use HyperDoc Browse or issue
)what op r1
to learn if there is any operation containing " r1 " in its name.
Cannot find a definition or applicable library operation named r1
with argument type(s)
Variable(objVal)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("r1.Basis", "Basis1")
There are no library operations named r1
Use HyperDoc Browse or issue
)what op r1
to learn if there is any operation containing " r1 " in its name.
Cannot find a definition or applicable library operation named r1
with argument type(s)
Variable(Basis)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
r1lu:=revisedSimplexLU( A, b, c, B)
>> System error:
The value
(0 . 0)
is not of type
UNSIGNED-BYTE
Continuing to read the file...
testEquals("floatNull(r1lu.X-X1)", "true")
There are no library operations named r1lu
Use HyperDoc Browse or issue
)what op r1lu
to learn if there is any operation containing " r1lu " in its
name.
Cannot find a definition or applicable library operation named r1lu
with argument type(s)
Variable(X)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("abs(r1lu.objVal-objVal1)<eps", "true")
There are no library operations named r1lu
Use HyperDoc Browse or issue
)what op r1lu
to learn if there is any operation containing " r1lu " in its
name.
Cannot find a definition or applicable library operation named r1lu
with argument type(s)
Variable(objVal)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("r1lu.Basis", "Basis1")
There are no library operations named r1lu
Use HyperDoc Browse or issue
)what op r1lu
to learn if there is any operation containing " r1lu " in its
name.
Cannot find a definition or applicable library operation named r1lu
with argument type(s)
Variable(Basis)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
--
---
A2 := matrix [[0,1,-1,0,0,0], [1,1,0,-1,0,0],
[-0.5,1,0,0,1,0],[-1,1,0,0,0,1]]
Type: Matrix(Float)
fricas
c2 := vector [2,-3,0,0,0,0]
Type: Vector(Integer)
fricas
b2 := vector [1,2,8,6]
Type: Vector(PositiveInteger
?)
fricas
B2 := [1,2,5,6]
Type: List(PositiveInteger
?)
fricas
X2:= [4.0,10.0,9.0,12.0,0.0,0.0]
Type: List(Float)
fricas
objVal2:= - 22.0
Type: Float
fricas
Basis2:= [3,2,1,4]
Type: List(PositiveInteger
?)
fricas
r2:=revisedSimplex( A2, b2, c2, B2)
>> System error:
The value
(0 . 0)
is not of type
UNSIGNED-BYTE
Continuing to read the file...
testEquals("floatNull(r2.X-X2)", "true")
There are no library operations named r2
Use HyperDoc Browse or issue
)what op r2
to learn if there is any operation containing " r2 " in its name.
Cannot find a definition or applicable library operation named r2
with argument type(s)
Variable(X)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("abs(r2.objVal-objVal2)<eps", "true")
There are no library operations named r2
Use HyperDoc Browse or issue
)what op r2
to learn if there is any operation containing " r2 " in its name.
Cannot find a definition or applicable library operation named r2
with argument type(s)
Variable(objVal)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("r2.Basis", "Basis2")
There are no library operations named r2
Use HyperDoc Browse or issue
)what op r2
to learn if there is any operation containing " r2 " in its name.
Cannot find a definition or applicable library operation named r2
with argument type(s)
Variable(Basis)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
r2lu:=revisedSimplexLU( A2, b2, c2, B2)
>> System error:
The value
(0 . 0)
is not of type
UNSIGNED-BYTE
Continuing to read the file...
testEquals("floatNull(r2lu.X-X2)", "true")
There are no library operations named r2lu
Use HyperDoc Browse or issue
)what op r2lu
to learn if there is any operation containing " r2lu " in its
name.
Cannot find a definition or applicable library operation named r2lu
with argument type(s)
Variable(X)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("abs(r2lu.objVal-objVal2)<eps", "true")
There are no library operations named r2lu
Use HyperDoc Browse or issue
)what op r2lu
to learn if there is any operation containing " r2lu " in its
name.
Cannot find a definition or applicable library operation named r2lu
with argument type(s)
Variable(objVal)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("r2lu.Basis", "Basis2")
There are no library operations named r2lu
Use HyperDoc Browse or issue
)what op r2lu
to learn if there is any operation containing " r2lu " in its
name.
Cannot find a definition or applicable library operation named r2lu
with argument type(s)
Variable(Basis)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
--
A3 := matrix [[0.4,0.5,1,0,0],[0,0.2,0,1,0],[0.6,0.3,0,0,1]]
Type: Matrix(Float)
fricas
c3 := vector [-40,-30,0,0,0]
Type: Vector(Integer)
fricas
b3 := vector [20,5,21]
Type: Vector(PositiveInteger
?)
fricas
B3 := [3,4,5]
Type: List(PositiveInteger
?)
fricas
X3:= [25.0,20.0,0.0,1.0,0.0]
Type: List(Float)
fricas
objVal3:= - 1600.0
Type: Float
fricas
Basis3:= [2,4,1]
Type: List(PositiveInteger
?)
fricas
r3:=revisedSimplex(A3, b3, c3, B3)
>> System error:
The value
(0 . 0)
is not of type
UNSIGNED-BYTE
Continuing to read the file...
testEquals("floatNull(r3.X-X3)", "true")
There are no library operations named r3
Use HyperDoc Browse or issue
)what op r3
to learn if there is any operation containing " r3 " in its name.
Cannot find a definition or applicable library operation named r3
with argument type(s)
Variable(X)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("abs(r3.objVal-objVal3)<eps", "true")
There are no library operations named r3
Use HyperDoc Browse or issue
)what op r3
to learn if there is any operation containing " r3 " in its name.
Cannot find a definition or applicable library operation named r3
with argument type(s)
Variable(objVal)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("r3.Basis", "Basis3")
There are no library operations named r3
Use HyperDoc Browse or issue
)what op r3
to learn if there is any operation containing " r3 " in its name.
Cannot find a definition or applicable library operation named r3
with argument type(s)
Variable(Basis)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
r3lu:=revisedSimplexLU(A3, b3, c3, B3)
>> System error:
The value
(0 . 0)
is not of type
UNSIGNED-BYTE
Continuing to read the file...
testEquals("floatNull(r3lu.X-X3)", "true")
There are no library operations named r3lu
Use HyperDoc Browse or issue
)what op r3lu
to learn if there is any operation containing " r3lu " in its
name.
Cannot find a definition or applicable library operation named r3lu
with argument type(s)
Variable(X)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("abs(r3lu.objVal-objVal3)<eps", "true")
There are no library operations named r3lu
Use HyperDoc Browse or issue
)what op r3lu
to learn if there is any operation containing " r3lu " in its
name.
Cannot find a definition or applicable library operation named r3lu
with argument type(s)
Variable(objVal)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("r3lu.Basis", "Basis3")
There are no library operations named r3lu
Use HyperDoc Browse or issue
)what op r3lu
to learn if there is any operation containing " r3lu " in its
name.
Cannot find a definition or applicable library operation named r3lu
with argument type(s)
Variable(Basis)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
--
A4 := matrix [[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],_
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],_
[0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0],_
[0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0],_
[3, 0, 6, 0, 5, 0, 7, 0, 1, 0, 0, 0, 0, 0, 1, 0],_
[0, 2, 0, 4, 0, 10, 0, 4, 0, 1, 0, 0, 0, 0, 0, 1]]
Type: Matrix(NonNegativeInteger
?)
fricas
b4 := vector [1, 1, 1, 1, 13, 10]
Type: Vector(PositiveInteger
?)
fricas
c4 := vector [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]
Type: Vector(NonNegativeInteger
?)
fricas
B4 := [11, 12, 13, 14, 15, 16]
Type: List(PositiveInteger
?)
fricas
X4:= [1.0, 0.0, 0.25, 0.7500000000_0000000001, 0.3, 0.7, 1.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
Type: List(Float)
fricas
objVal4:= 0.0
Type: Float
fricas
Basis4:= [1,3,6,5,7,4]
Type: List(PositiveInteger
?)
fricas
r4 := revisedSimplex( A4, b4, c4, B4)
>> System error:
The value
(0 . 0)
is not of type
UNSIGNED-BYTE
Continuing to read the file...
testEquals("floatNull(r4.X-X4)", "true")
There are no library operations named r4
Use HyperDoc Browse or issue
)what op r4
to learn if there is any operation containing " r4 " in its name.
Cannot find a definition or applicable library operation named r4
with argument type(s)
Variable(X)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("abs(r4.objVal-objVal4)<eps", "true")
There are no library operations named r4
Use HyperDoc Browse or issue
)what op r4
to learn if there is any operation containing " r4 " in its name.
Cannot find a definition or applicable library operation named r4
with argument type(s)
Variable(objVal)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("r4.Basis", "Basis4")
There are no library operations named r4
Use HyperDoc Browse or issue
)what op r4
to learn if there is any operation containing " r4 " in its name.
Cannot find a definition or applicable library operation named r4
with argument type(s)
Variable(Basis)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
r4lu := revisedSimplexLU( A4, b4, c4, B4)
>> System error:
The value
(0 . 0)
is not of type
UNSIGNED-BYTE
Continuing to read the file...
testEquals("floatNull(r4lu.X-X4)", "true")
There are no library operations named r4lu
Use HyperDoc Browse or issue
)what op r4lu
to learn if there is any operation containing " r4lu " in its
name.
Cannot find a definition or applicable library operation named r4lu
with argument type(s)
Variable(X)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("abs(r4lu.objVal-objVal4)<eps", "true")
There are no library operations named r4lu
Use HyperDoc Browse or issue
)what op r4lu
to learn if there is any operation containing " r4lu " in its
name.
Cannot find a definition or applicable library operation named r4lu
with argument type(s)
Variable(objVal)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("r4lu.Basis", "Basis4")
There are no library operations named r4lu
Use HyperDoc Browse or issue
)what op r4lu
to learn if there is any operation containing " r4lu " in its
name.
Cannot find a definition or applicable library operation named r4lu
with argument type(s)
Variable(Basis)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
--
A5 := matrix [[1, -1, 1, 0, 0], [4, 9, 0, 1, 0], [-2, 4, 0, 0, 1]]
Type: Matrix(Integer)
fricas
c5 := vector [-1, -1, 0, 0, 0]
Type: Vector(Integer)
fricas
b5 := vector [2, 18, 4]
Type: Vector(PositiveInteger
?)
fricas
B5 := vector [3, 4, 5]
Type: Vector(PositiveInteger
?)
fricas
X5 := [2.7692307692_307692308, 0.7692307692_3076923077, 0.0, 0.0,
6.4615384615_384615385]
Type: List(Float)
fricas
objVal5:= - 3.5384615384_615384615
Type: Float
fricas
Basis5:= [1,2,5]
Type: List(PositiveInteger
?)
fricas
r5 := revisedSimplex( A5, b5, c5, B5)
>> System error:
The value
(0 . 0)
is not of type
UNSIGNED-BYTE
Continuing to read the file...
testEquals("floatNull(r5.X-X5)", "true")
There are no library operations named r5
Use HyperDoc Browse or issue
)what op r5
to learn if there is any operation containing " r5 " in its name.
Cannot find a definition or applicable library operation named r5
with argument type(s)
Variable(X)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("abs(r5.objVal-objVal5)<eps", "true")
There are no library operations named r5
Use HyperDoc Browse or issue
)what op r5
to learn if there is any operation containing " r5 " in its name.
Cannot find a definition or applicable library operation named r5
with argument type(s)
Variable(objVal)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("r5.Basis", "Basis5")
There are no library operations named r5
Use HyperDoc Browse or issue
)what op r5
to learn if there is any operation containing " r5 " in its name.
Cannot find a definition or applicable library operation named r5
with argument type(s)
Variable(Basis)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
r5lu := revisedSimplexLU( A5, b5, c5, B5)
>> System error:
The value
(0 . 0)
is not of type
UNSIGNED-BYTE
Continuing to read the file...
testEquals("floatNull(r5lu.X-X5)", "true")
There are no library operations named r5lu
Use HyperDoc Browse or issue
)what op r5lu
to learn if there is any operation containing " r5lu " in its
name.
Cannot find a definition or applicable library operation named r5lu
with argument type(s)
Variable(X)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("abs(r5lu.objVal-objVal5)<eps", "true")
There are no library operations named r5lu
Use HyperDoc Browse or issue
)what op r5lu
to learn if there is any operation containing " r5lu " in its
name.
Cannot find a definition or applicable library operation named r5lu
with argument type(s)
Variable(objVal)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
testEquals("r5lu.Basis", "Basis5")
There are no library operations named r5lu
Use HyperDoc Browse or issue
)what op r5lu
to learn if there is any operation containing " r5lu " in its
name.
Cannot find a definition or applicable library operation named r5lu
with argument type(s)
Variable(Basis)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Type: Void
fricas
-- Results/Statistics
fricas
)set output algebra on
fricas
)version
"FriCAS 1.3.10 compiled at Wed 10 Jan 02:19:45 CET 2024"
fricas
)lisp (lisp-implementation-type)
Your user access level is compiler and this command is therefore not
available. See the )set userlevel command for more information.
fricas
)lisp (lisp-implementation-version)
Your user access level is compiler and this command is therefore not
available. See the )set userlevel command for more information.
statistics()
=============================================================================
General WARNINGS:
* do not use ')clear completely' before having used 'statistics()'
It clears the statistics without warning!
* do not forget to pass the arguments of the testXxxx functions as Strings!
Otherwise, the test will fail and statistics() will not notice!
=============================================================================
Testsuite: Package: LinearProgramming
failed (total): 1 (1)
failed testcases were:
---------------------------------------------------------------------------
Testcase: revisedSimplex
failed (total): 30 (30)
fatal tests were:
1: EQUL: (floatNull(r1.X-X1), true)
2: EQUL: (abs(r1.objVal-objVal1)<eps, true)
3: EQUL: (r1.Basis, Basis1)
4: EQUL: (floatNull(r1lu.X-X1), true)
5: EQUL: (abs(r1lu.objVal-objVal1)<eps, true)
6: EQUL: (r1lu.Basis, Basis1)
7: EQUL: (floatNull(r2.X-X2), true)
8: EQUL: (abs(r2.objVal-objVal2)<eps, true)
9: EQUL: (r2.Basis, Basis2)
10: EQUL: (floatNull(r2lu.X-X2), true)
11: EQUL: (abs(r2lu.objVal-objVal2)<eps, true)
12: EQUL: (r2lu.Basis, Basis2)
13: EQUL: (floatNull(r3.X-X3), true)
14: EQUL: (abs(r3.objVal-objVal3)<eps, true)
15: EQUL: (r3.Basis, Basis3)
16: EQUL: (floatNull(r3lu.X-X3), true)
17: EQUL: (abs(r3lu.objVal-objVal3)<eps, true)
18: EQUL: (r3lu.Basis, Basis3)
19: EQUL: (floatNull(r4.X-X4), true)
20: EQUL: (abs(r4.objVal-objVal4)<eps, true)
21: EQUL: (r4.Basis, Basis4)
22: EQUL: (floatNull(r4lu.X-X4), true)
23: EQUL: (abs(r4lu.objVal-objVal4)<eps, true)
24: EQUL: (r4lu.Basis, Basis4)
25: EQUL: (floatNull(r5.X-X5), true)
26: EQUL: (abs(r5.objVal-objVal5)<eps, true)
27: EQUL: (r5.Basis, Basis5)
28: EQUL: (floatNull(r5lu.X-X5), true)
29: EQUL: (abs(r5lu.objVal-objVal5)<eps, true)
30: EQUL: (r5lu.Basis, Basis5)
=============================================================================
testsuite | testcases: failed (total) | tests: failed (total)
Package: LinearProgramming 1 (1) 30 (30)
=============================================================================
File summary.
unexpected failures: 30
expected failures: 0
unexpected passes: 0
total tests: 30
Type: Void