Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122143648
ncp_functions.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jul 16, 03:00
Size
713 B
Mime Type
text/x-c
Expires
Fri, Jul 18, 03:00 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27440324
Attached To
rSPECMICP SpecMiCP / ReactMiCP
ncp_functions.cpp
View Options
#include "catch.hpp"
#include "specmicp_common/micpsolver/ncp_function.hpp"
TEST_CASE
(
"Box constrained VI"
,
"[VI],[B-function]"
)
{
SECTION
(
"Function"
)
{
auto
vi_func
=
specmicp
::
micpsolver
::
box_constrained_vi_b_function
<
double
>
;
CHECK
(
vi_func
(
0.0
,
2.0
,
0.0
,
5.0
)
==
0.0
);
CHECK
(
vi_func
(
5.0
,
-
3.0
,
0.0
,
5.0
)
==
0.0
);
CHECK
(
vi_func
(
2.0
,
0.0
,
0.0
,
5.0
)
==
0.0
);
CHECK
(
vi_func
(
2.0
,
3.0
,
0.0
,
5.0
)
!=
0.0
);
CHECK
(
vi_func
(
-
2.0
,
3.0
,
0.0
,
5.0
)
!=
0.0
);
CHECK
(
vi_func
(
8.0
,
-
2.0
,
0.0
,
5.0
)
!=
0.0
);
CHECK
(
vi_func
(
0.0
,
0.0
,
0.0
,
5.0
)
==
0.0
);
CHECK
(
vi_func
(
5.0
,
0.0
,
0.0
,
5.0
)
==
0.0
);
}
SECTION
(
"Jacobian"
)
{
}
}
Event Timeline
Log In to Comment