Skip to content

Conversation

@ocots
Copy link
Member

@ocots ocots commented Sep 8, 2025

Need to add the comparison between the exa problems and the others in test_init, test_solution and test_quick.

@ocots ocots marked this pull request as draft September 8, 2025 20:12
@ocots
Copy link
Member Author

ocots commented Sep 9, 2025

@jbcaillau I have updated the unit tests. Now all the problems "_s" are tested and compared to JuMP.

But, I haven't checked yet that all the tests pass except for:

    :bioreactor,
    :cart_pendulum,
    :dielectrophoretic_particle,
    :moonlander,

@ocots
Copy link
Member Author

ocots commented Sep 9, 2025

Testing init

@jbcaillau @PierreMartinon For :glider, even if we set tfinit=1, we get in the tests:

┌─ glider (init)
│
├─ Iterations
│       JP: 0  OC: 0  OS: 0
├─ Variables
│       JP: 2506  OC: 2506  PASS
│       JP: 2506  OS: 2506  PASS
├─ Constraints
│       JP: 2007  OC: 2007  PASS
│       JP: 2007  OS: 2007  PASS
├─ Final time
│       JP: 1.000e+00  OC: 1.000e+00  r_err=0.000e+00  a_err=0.000e+00  bound=1.000e-06  PASS
│       JP: 1.000e+00  OS: 7.000e-01  r_err=3.529e-01  a_err=3.000e-01  bound=1.000e-06  FAIL
├─ Grid length
│       JP: 501  OC: 501  PASS
│       JP: 501  OS: 501  PASS
├─ Objective
│       JP: -1.323e+01  OC: -1.323e+01  r_err=-0.000e+00  a_err=0.000e+00  bound=1.000e-06  PASS
│       JP: -1.323e+01  OS: -1.323e+01  r_err=-0.000e+00  a_err=0.000e+00  bound=1.000e-06  PASS
└─

Note that I have set :madnlp and :exa for glider_s.

Note

It works with :madnlp and :adnlp.

@ocots
Copy link
Member Author

ocots commented Sep 10, 2025

I have printed the time grid and the variable in the build solution:

BUILD SOLUTION: glider

time grid: [0.0, 0.002, 0.004, 0.006, 0.008, 0.01, 0.012, 0.014, 0.016, 0.018, 0.02, 0.022, 0.024, 0.026, 0.028, 0.03, 0.032, 0.034, 0.036, 0.038, 0.04, 0.042, 0.044, 0.046, 0.048, 0.05, 0.052, 0.054, 0.056, 0.058, 0.06, 0.062, 0.064, 0.066, 0.068, 0.07, 0.072, 0.074, 0.076, 0.078, 0.08, 0.082, 0.084, 0.086, 0.088, 0.09, 0.092, 0.094, 0.096, 0.098, 0.1, 0.102, 0.104, 0.106, 0.108, 0.11, 0.112, 0.114, 0.116, 0.118, 0.12, 0.122, 0.124, 0.126, 0.128, 0.13, 0.132, 0.134, 0.136, 0.138, 0.14, 0.142, 0.144, 0.146, 0.148, 0.15, 0.152, 0.154, 0.156, 0.158, 0.16, 0.162, 0.164, 0.166, 0.168, 0.17, 0.172, 0.174, 0.176, 0.178, 0.18, 0.182, 0.184, 0.186, 0.188, 0.19, 0.192, 0.194, 0.196, 0.198, 0.2, 0.202, 0.204, 0.206, 0.208, 0.21, 0.212, 0.214, 0.216, 0.218, 0.22, 0.222, 0.224, 0.226, 0.228, 0.23, 0.232, 0.234, 0.236, 0.238, 0.24, 0.242, 0.244, 0.246, 0.248, 0.25, 0.252, 0.254, 0.256, 0.258, 0.26, 0.262, 0.264, 0.266, 0.268, 0.27, 0.272, 0.274, 0.276, 0.278, 0.28, 0.282, 0.284, 0.286, 0.288, 0.29, 0.292, 0.294, 0.296, 0.298, 0.3, 0.302, 0.304, 0.306, 0.308, 0.31, 0.312, 0.314, 0.316, 0.318, 0.32, 0.322, 0.324, 0.326, 0.328, 0.33, 0.332, 0.334, 0.336, 0.338, 0.34, 0.342, 0.344, 0.346, 0.348, 0.35, 0.352, 0.354, 0.356, 0.358, 0.36, 0.362, 0.364, 0.366, 0.368, 0.37, 0.372, 0.374, 0.376, 0.378, 0.38, 0.382, 0.384, 0.386, 0.388, 0.39, 0.392, 0.394, 0.396, 0.398, 0.4, 0.402, 0.404, 0.406, 0.408, 0.41, 0.412, 0.414, 0.416, 0.418, 0.42, 0.422, 0.424, 0.426, 0.428, 0.43, 0.432, 0.434, 0.436, 0.438, 0.44, 0.442, 0.444, 0.446, 0.448, 0.45, 0.452, 0.454, 0.456, 0.458, 0.46, 0.462, 0.464, 0.466, 0.468, 0.47, 0.472, 0.474, 0.476, 0.478, 0.48, 0.482, 0.484, 0.486, 0.488, 0.49, 0.492, 0.494, 0.496, 0.498, 0.5, 0.502, 0.504, 0.506, 0.508, 0.51, 0.512, 0.514, 0.516, 0.518, 0.52, 0.522, 0.524, 0.526, 0.528, 0.53, 0.532, 0.534, 0.536, 0.538, 0.54, 0.542, 0.544, 0.546, 0.548, 0.55, 0.552, 0.554, 0.556, 0.558, 0.56, 0.562, 0.564, 0.566, 0.568, 0.57, 0.572, 0.574, 0.576, 0.578, 0.58, 0.582, 0.584, 0.586, 0.588, 0.59, 0.592, 0.594, 0.596, 0.598, 0.6, 0.602, 0.604, 0.606, 0.608, 0.61, 0.612, 0.614, 0.616, 0.618, 0.62, 0.622, 0.624, 0.626, 0.628, 0.63, 0.632, 0.634, 0.636, 0.638, 0.64, 0.642, 0.644, 0.646, 0.648, 0.65, 0.652, 0.654, 0.656, 0.658, 0.66, 0.662, 0.664, 0.666, 0.668, 0.67, 0.672, 0.674, 0.676, 0.678, 0.68, 0.682, 0.684, 0.686, 0.688, 0.69, 0.692, 0.694, 0.696, 0.698, 0.7, 0.702, 0.704, 0.706, 0.708, 0.71, 0.712, 0.714, 0.716, 0.718, 0.72, 0.722, 0.724, 0.726, 0.728, 0.73, 0.732, 0.734, 0.736, 0.738, 0.74, 0.742, 0.744, 0.746, 0.748, 0.75, 0.752, 0.754, 0.756, 0.758, 0.76, 0.762, 0.764, 0.766, 0.768, 0.77, 0.772, 0.774, 0.776, 0.778, 0.78, 0.782, 0.784, 0.786, 0.788, 0.79, 0.792, 0.794, 0.796, 0.798, 0.8, 0.802, 0.804, 0.806, 0.808, 0.81, 0.812, 0.814, 0.816, 0.818, 0.82, 0.822, 0.824, 0.826, 0.828, 0.83, 0.832, 0.834, 0.836, 0.838, 0.84, 0.842, 0.844, 0.846, 0.848, 0.85, 0.852, 0.854, 0.856, 0.858, 0.86, 0.862, 0.864, 0.866, 0.868, 0.87, 0.872, 0.874, 0.876, 0.878, 0.88, 0.882, 0.884, 0.886, 0.888, 0.89, 0.892, 0.894, 0.896, 0.898, 0.9, 0.902, 0.904, 0.906, 0.908, 0.91, 0.912, 0.914, 0.916, 0.918, 0.92, 0.922, 0.924, 0.926, 0.928, 0.93, 0.932, 0.934, 0.936, 0.938, 0.94, 0.942, 0.944, 0.946, 0.948, 0.95, 0.952, 0.954, 0.956, 0.958, 0.96, 0.962, 0.964, 0.966, 0.968, 0.97, 0.972, 0.974, 0.976, 0.978, 0.98, 0.982, 0.984, 0.986, 0.988, 0.99, 0.992, 0.994, 0.996, 0.998, 1.0]
variable: [1.0]

BUILD SOLUTION: glider_s

time grid: [0.0, 0.0014, 0.0028, 0.0042, 0.0056, 0.006999999999999999, 0.0084, 0.0098, 0.0112, 0.012599999999999998, 0.013999999999999999, 0.015399999999999999, 0.0168, 0.018199999999999997, 0.0196, 0.020999999999999998, 0.0224, 0.0238, 0.025199999999999997, 0.0266, 0.027999999999999997, 0.0294, 0.030799999999999998, 0.0322, 0.0336, 0.034999999999999996, 0.036399999999999995, 0.0378, 0.0392, 0.0406, 0.041999999999999996, 0.043399999999999994, 0.0448, 0.0462, 0.0476, 0.049, 0.05039999999999999, 0.05179999999999999, 0.0532, 0.054599999999999996, 0.055999999999999994, 0.0574, 0.0588, 0.06019999999999999, 0.061599999999999995, 0.063, 0.0644, 0.0658, 0.0672, 0.0686, 0.06999999999999999, 0.07139999999999999, 0.07279999999999999, 0.07419999999999999, 0.0756, 0.077, 0.0784, 0.0798, 0.0812, 0.08259999999999999, 0.08399999999999999, 0.08539999999999999, 0.08679999999999999, 0.0882, 0.0896, 0.091, 0.0924, 0.0938, 0.0952, 0.0966, 0.098, 0.09939999999999999, 0.10079999999999999, 0.10219999999999999, 0.10359999999999998, 0.105, 0.1064, 0.10779999999999999, 0.10919999999999999, 0.11059999999999999, 0.11199999999999999, 0.1134, 0.1148, 0.1162, 0.1176, 0.119, 0.12039999999999998, 0.12179999999999998, 0.12319999999999999, 0.12459999999999999, 0.126, 0.12739999999999999, 0.1288, 0.13019999999999998, 0.1316, 0.13299999999999998, 0.1344, 0.1358, 0.1372, 0.1386, 0.13999999999999999, 0.1414, 0.14279999999999998, 0.1442, 0.14559999999999998, 0.147, 0.14839999999999998, 0.1498, 0.1512, 0.15259999999999999, 0.154, 0.15539999999999998, 0.1568, 0.1582, 0.1596, 0.161, 0.1624, 0.1638, 0.16519999999999999, 0.16659999999999997, 0.16799999999999998, 0.1694, 0.17079999999999998, 0.1722, 0.17359999999999998, 0.175, 0.1764, 0.17779999999999999, 0.1792, 0.18059999999999998, 0.182, 0.1834, 0.1848, 0.1862, 0.1876, 0.189, 0.1904, 0.1918, 0.1932, 0.1946, 0.196, 0.19739999999999996, 0.19879999999999998, 0.20019999999999996, 0.20159999999999997, 0.20299999999999999, 0.20439999999999997, 0.20579999999999998, 0.20719999999999997, 0.20859999999999998, 0.21, 0.21139999999999998, 0.2128, 0.21419999999999997, 0.21559999999999999, 0.217, 0.21839999999999998, 0.2198, 0.22119999999999998, 0.2226, 0.22399999999999998, 0.2254, 0.2268, 0.2282, 0.2296, 0.23099999999999998, 0.2324, 0.2338, 0.2352, 0.2366, 0.238, 0.2394, 0.24079999999999996, 0.24219999999999997, 0.24359999999999996, 0.24499999999999997, 0.24639999999999998, 0.24779999999999996, 0.24919999999999998, 0.2506, 0.252, 0.25339999999999996, 0.25479999999999997, 0.2562, 0.2576, 0.259, 0.26039999999999996, 0.2618, 0.2632, 0.2646, 0.26599999999999996, 0.26739999999999997, 0.2688, 0.2702, 0.2716, 0.27299999999999996, 0.2744, 0.2758, 0.2772, 0.2786, 0.27999999999999997, 0.2814, 0.2828, 0.2842, 0.28559999999999997, 0.287, 0.2884, 0.28979999999999995, 0.29119999999999996, 0.29259999999999997, 0.294, 0.2954, 0.29679999999999995, 0.29819999999999997, 0.2996, 0.301, 0.3024, 0.30379999999999996, 0.30519999999999997, 0.3066, 0.308, 0.3094, 0.31079999999999997, 0.3122, 0.3136, 0.315, 0.3164, 0.31779999999999997, 0.3192, 0.3206, 0.322, 0.3234, 0.3248, 0.3262, 0.3276, 0.32899999999999996, 0.33039999999999997, 0.3318, 0.33319999999999994, 0.33459999999999995, 0.33599999999999997, 0.3374, 0.3388, 0.34019999999999995, 0.34159999999999996, 0.34299999999999997, 0.3444, 0.3458, 0.34719999999999995, 0.34859999999999997, 0.35, 0.3514, 0.3528, 0.35419999999999996, 0.35559999999999997, 0.357, 0.3584, 0.3598, 0.36119999999999997, 0.3626, 0.364, 0.3654, 0.3668, 0.36819999999999997, 0.3696, 0.371, 0.3724, 0.3738, 0.3752, 0.3766, 0.378, 0.3794, 0.3808, 0.3822, 0.3836, 0.385, 0.3864, 0.38780000000000003, 0.3892, 0.3906, 0.392, 0.3934, 0.39479999999999993, 0.39619999999999994, 0.39759999999999995, 0.39899999999999997, 0.4003999999999999, 0.40179999999999993, 0.40319999999999995, 0.40459999999999996, 0.40599999999999997, 0.40739999999999993, 0.40879999999999994, 0.41019999999999995, 0.41159999999999997, 0.413, 0.41439999999999994, 0.41579999999999995, 0.41719999999999996, 0.41859999999999997, 0.42, 0.42139999999999994, 0.42279999999999995, 0.42419999999999997, 0.4256, 0.427, 0.42839999999999995, 0.42979999999999996, 0.43119999999999997, 0.4326, 0.434, 0.43539999999999995, 0.43679999999999997, 0.4382, 0.4396, 0.44099999999999995, 0.44239999999999996, 0.4438, 0.4452, 0.4466, 0.44799999999999995, 0.44939999999999997, 0.4508, 0.4522, 0.4536, 0.45499999999999996, 0.4564, 0.4578, 0.4592, 0.4606, 0.46199999999999997, 0.4634, 0.4648, 0.4662, 0.4676, 0.469, 0.4704, 0.4718, 0.4732, 0.4746, 0.476, 0.4774, 0.4788, 0.4802, 0.4815999999999999, 0.48299999999999993, 0.48439999999999994, 0.48579999999999995, 0.4871999999999999, 0.4885999999999999, 0.48999999999999994, 0.49139999999999995, 0.49279999999999996, 0.4941999999999999, 0.49559999999999993, 0.49699999999999994, 0.49839999999999995, 0.49979999999999997, 0.5012, 0.5025999999999999, 0.504, 0.5054, 0.5067999999999999, 0.5082, 0.5095999999999999, 0.511, 0.5124, 0.5137999999999999, 0.5152, 0.5166, 0.518, 0.5194, 0.5207999999999999, 0.5222, 0.5236, 0.5249999999999999, 0.5264, 0.5277999999999999, 0.5292, 0.5306, 0.5319999999999999, 0.5334, 0.5347999999999999, 0.5362, 0.5376, 0.5389999999999999, 0.5404, 0.5418, 0.5432, 0.5446, 0.5459999999999999, 0.5474, 0.5488, 0.5502, 0.5516, 0.5529999999999999, 0.5544, 0.5558, 0.5572, 0.5586, 0.5599999999999999, 0.5614, 0.5628, 0.5642, 0.5656, 0.567, 0.5684, 0.5698, 0.5711999999999999, 0.5725999999999999, 0.574, 0.5753999999999999, 0.5768, 0.5781999999999999, 0.5795999999999999, 0.581, 0.5823999999999999, 0.5838, 0.5851999999999999, 0.5865999999999999, 0.588, 0.5893999999999999, 0.5908, 0.5922, 0.5935999999999999, 0.595, 0.5963999999999999, 0.5978, 0.5992, 0.6005999999999999, 0.602, 0.6033999999999999, 0.6048, 0.6062, 0.6075999999999999, 0.609, 0.6103999999999999, 0.6118, 0.6132, 0.6145999999999999, 0.616, 0.6174, 0.6188, 0.6202, 0.6215999999999999, 0.623, 0.6244, 0.6258, 0.6272, 0.6285999999999999, 0.63, 0.6314, 0.6328, 0.6342, 0.6355999999999999, 0.637, 0.6384, 0.6398, 0.6412, 0.6426, 0.644, 0.6454, 0.6468, 0.6482, 0.6496, 0.651, 0.6524, 0.6538, 0.6552, 0.6566, 0.6579999999999999, 0.6593999999999999, 0.6607999999999999, 0.6621999999999999, 0.6636, 0.6649999999999999, 0.6663999999999999, 0.6678, 0.6691999999999999, 0.6706, 0.6719999999999999, 0.6733999999999999, 0.6748, 0.6761999999999999, 0.6776, 0.6789999999999999, 0.6803999999999999, 0.6818, 0.6831999999999999, 0.6846, 0.6859999999999999, 0.6873999999999999, 0.6888, 0.6901999999999999, 0.6916, 0.693, 0.6943999999999999, 0.6958, 0.6971999999999999, 0.6986, 0.7]
variable: [1.0]

Clearly, the time grid is not reconstructed well.

@ocots ocots marked this pull request as ready for review September 15, 2025 15:30
@ocots ocots merged commit b80b7de into 88-dev-adding-models-for-exa Sep 15, 2025
1 of 3 checks passed
@ocots ocots deleted the 88-dev-adding-models-for-exa-olivier branch September 15, 2025 15:30
@ocots ocots mentioned this pull request Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants