Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.7.24 ploty_sliding block #185

Closed
wants to merge 4 commits into from

Conversation

Peter230655
Copy link
Contributor

No description provided.

@Peter230655
Copy link
Contributor Author

Was this from a branch as it should be?
Thanks!
(I managed to delete big parts of my program, this is the re-established version)

@moorepants
Copy link
Member

Was this from a branch as it should be?

Yes!

@Peter230655
Copy link
Contributor Author

Was this from a branch as it should be?

Yes!

I hope, more than just plain luck...!

@moorepants
Copy link
Member

The computation time is relatively large compared to the other examples:

computation time summary:
    - ../examples-gallery/plot_sliding_block.py:                         107.93 sec   0.0 MB
    - ../examples-gallery/plot_parallel_park.py:                          70.83 sec   0.0 MB
    - ../examples-gallery/plot_pendulum_swing_up_variable_duration.py:    70.61 sec   0.0 MB
    - ../examples-gallery/plot_two_link_pendulum_on_a_cart.py:            70.43 sec   0.0 MB
    - ../examples-gallery/plot_pendulum_swing_up_fixed_duration.py:       67.41 sec   0.0 MB
    - ../examples-gallery/plot_one_legged_time_trial.py:                  42.07 sec   0.0 MB
    - ../examples-gallery/plot_drone.py:                                  40.14 sec   0.0 MB
    - ../examples-gallery/plot_betts2003.py:                               9.01 sec   0.0 MB

Also some issues still:

/home/runner/work/opty/opty/docs/examples/index.rst:126: WARNING: Failed to create a cross reference. A title or caption not found: 'sphx_glr_examples_plot_sliding_block.py'
/home/runner/work/opty/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/runner/work/opty/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/runner/work/opty/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/runner/work/opty/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/runner/work/opty/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/runner/work/opty/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/runner/work/opty/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/runner/work/opty/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/runner/work/opty/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/runner/work/opty/opty/docs/examples/sg_execution_times.rst:35: WARNING: Failed to create a cross reference. A title or caption not found: 'sphx_glr_examples_plot_sliding_block.py'
/home/runner/work/opty/opty/docs/sg_execution_times.rst:35: WARNING: Failed to create a cross reference. A title or caption not found: 'sphx_glr_examples_plot_sliding_block.py'

@Peter230655
Copy link
Contributor Author

Running time:
Om my PC it takes less tan 18 sec to run it (but I do not get the animations, still did not manage)

other issues:
I won't ask you what they mean, since you will only tell me to google them! :-)

@moorepants
Copy link
Member

If you are not building the documentation locally, you will not see all of the errors/warnings nor will you get the full timings.

@Peter230655
Copy link
Contributor Author

You told me this:
If you run python examples-gallery/plot_sliding_block.py the animation should play for you.

I am running these .py simulations in VSC, maybe this causes the problems?
I guess I need to ask my son to set up python for me. :-(

@moorepants
Copy link
Member

moorepants commented Jul 8, 2024

You have python setup already. You can run it many ways: jupyter, vs code, command prompt, etc. The command prompt is the most basic and universal way to interact with python, thus all instructions we provide in development is for the command prompt. If we explain the hundreds of ways to interact with python in our readme's, they'd be miles long.

I sent the two software carpentry lessions: shell (command prompt) and git. If you master those two lessons you have the basics in place. Everything else (github, jupyter, vs code) is just a glossy cover over those two things.

@moorepants
Copy link
Member

For example this is how I test your pull request at the command prompt (note this will have slight differences on windows):

moorepants$ cd ~/src/opty/
opty(master)$ git fetch Peter230655 plot_sliding_block_2
remote: Enumerating objects: 33, done.
remote: Counting objects: 100% (31/31), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 22 (delta 15), reused 17 (delta 10), pack-reused 0
Unpacking objects: 100% (22/22), 7.34 KiB | 577.00 KiB/s, done.
From github.com:Peter230655/opty
 * branch            plot_sliding_block_2 -> FETCH_HEAD
 * [new branch]      plot_sliding_block_2 -> Peter230655/plot_sliding_block_2
opty(master)$ git checkout --track Peter230655/plot_sliding_block_2 
branch 'plot_sliding_block_2' set up to track 'Peter230655/plot_sliding_block_2'.
Switched to a new branch 'plot_sliding_block_2'
opty(plot_sliding_block_2)$ conda env create -f opty-dev-env.yml
<lots of conda install output>
opty(plot_sliding_block_2)$ conda activate opty-dev 
(opty-dev) opty(plot_sliding_block_2)$ which python
/home/moorepants/miniconda/envs/opty-dev/bin/python
(opty-dev) opty(plot_sliding_block_2)$ cd docs/
(opty-dev) docs(plot_sliding_block_2)$ make clean
Removing everything under '_build'...
(opty-dev) docs(plot_sliding_block_2)$ make html
Running Sphinx v7.3.7
making output directory... done
Using Sphinx-Gallery to convert rst text blocks to markdown for .ipynb files.
[autosummary] generating autosummary for: api.rst, examples.rst, examples/index.rst, examples/plot_betts2003.rst, examples/plot_drone.rst, examples/plot_one_legged_time_trial.rst, examples/plot_parallel_park.rst, examples/plot_pendulum_swing_up_fixed_duration.rst, examples/plot_pendulum_swing_up_variable_duration.rst, examples/plot_sliding_block.rst, examples/plot_two_link_pendulum_on_a_cart.rst, examples/sg_execution_times.rst, index.rst, sg_execution_times.rst, theory.rst
generating gallery...
generating gallery for examples... [100%] plot_one_legged_time_trial.py
******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit https://github.com/coin-or/Ipopt
******************************************************************************

This is Ipopt version 3.14.16, running with linear solver MUMPS 5.7.2.

Number of nonzeros in equality constraint Jacobian...:    91885
Number of nonzeros in inequality constraint Jacobian.:        0
Number of nonzeros in Lagrangian Hessian.............:        0

Total number of variables............................:     4241
                     variables with only lower bounds:        0
                variables with lower and upper bounds:     2121
                     variables with only upper bounds:        0
Total number of equality constraints.................:     3181
Total number of inequality constraints...............:        0
        inequality constraints with only lower bounds:        0
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        0

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0  2.0000000e-02 6.84e+02 1.46e-05   0.0 0.00e+00    -  0.00e+00 0.00e+00   0
   1  1.9179269e-02 6.80e+02 3.25e+03   1.0 6.16e+02    -  1.28e-02 1.03e-02f  1
   2  1.9031353e-02 6.79e+02 8.15e+03   2.0 5.27e+02    -  1.36e-01 2.59e-03f  1
   3  1.8883513e-02 6.78e+02 6.45e+04   3.1 5.11e+02    -  3.18e-02 3.07e-03h  1
   4  1.8891090e-02 6.78e+02 7.92e+04  -4.3 5.01e+02    -  7.94e-04 1.33e-04h  1
   5  1.8923894e-02 6.77e+02 1.00e+05   3.6 7.85e+02    -  1.34e-03 6.70e-04h  1
   6  1.9050732e-02 6.77e+02 1.10e+06   3.6 4.89e+02    -  5.10e-03 5.02e-04h  1
   7  1.9610477e-02 6.76e+02 2.68e+06   3.6 2.87e+02    -  5.19e-03 1.54e-03h  1
   8  1.9694127e-02 6.76e+02 3.38e+06   3.6 5.93e+02    -  6.80e-04 2.56e-04h  1
   9  1.9874606e-02 6.75e+02 3.81e+06   3.6 7.94e+02    -  6.31e-04 5.63e-04h  1
<lots of ipopt output>
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 200  2.4607361e-02 3.79e-05 1.04e-09 -11.0 8.13e-03    -  1.00e+00 1.00e+00H  1
 201  2.4607361e-02 1.20e-05 3.15e-10 -11.0 4.21e-03    -  1.00e+00 1.00e+00H  1
 202  2.4607361e-02 1.72e-07 2.87e-11 -11.0 5.91e-04    -  1.00e+00 1.00e+00H  1
 203  2.4607361e-02 5.50e-06 3.03e-09 -11.0 4.64e-03    -  1.00e+00 6.25e-02h  5
 204  2.4607361e-02 1.34e-11 1.97e-11 -11.0 1.98e-07  -4.0 1.00e+00 1.00e+00h  1

Number of Iterations....: 204

                                   (scaled)                 (unscaled)
Objective...............:   2.4607360894979963e-02    2.4607360894979963e-02
Dual infeasibility......:   1.9668184546835490e-11    1.9668184546835490e-11
Constraint violation....:   1.3385070829485812e-11    1.3385070829485812e-11
Variable bound violation:   1.0734583222316019e-08    1.0734583222316019e-08
Complementarity.........:   1.0000000671879242e-11    1.0000000671879242e-11
Overall NLP error.......:   1.9668184546835490e-11    1.9668184546835490e-11


Number of objective function evaluations             = 287
Number of objective gradient evaluations             = 192
Number of equality constraint evaluations            = 287
Number of inequality constraint evaluations          = 0
Number of equality constraint Jacobian evaluations   = 206
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations             = 0
Total seconds in IPOPT                               = 5.985

EXIT: Optimal Solution Found.

computation time summary:
    - ../examples-gallery/plot_one_legged_time_trial.py:                 46.76 sec   0.0 MB
    - ../examples-gallery/plot_betts2003.py:                              0.00 sec   0.0 MB
    - ../examples-gallery/plot_drone.py:                                  0.00 sec   0.0 MB
    - ../examples-gallery/plot_parallel_park.py:                          0.00 sec   0.0 MB
    - ../examples-gallery/plot_pendulum_swing_up_fixed_duration.py:       0.00 sec   0.0 MB
    - ../examples-gallery/plot_pendulum_swing_up_variable_duration.py:    0.00 sec   0.0 MB
    - ../examples-gallery/plot_sliding_block.py:                          0.00 sec   0.0 MB
    - ../examples-gallery/plot_two_link_pendulum_on_a_cart.py:            0.00 sec   0.0 MB
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 15 source files that are out of date
updating environment: [new config] 15 added, 0 changed, 0 removed
This is Ipopt version 3.14.16, running with linear solver MUMPS 5.7.2.

Number of nonzeros in equality constraint Jacobian...:    49990
Number of nonzeros in inequality constraint Jacobian.:        0
Number of nonzeros in Lagrangian Hessian.............:        0

Total number of variables............................:    10001
                     variables with only lower bounds:        0
                variables with lower and upper bounds:        0
                     variables with only upper bounds:        0
Total number of equality constraints.................:     9998
Total number of inequality constraints...............:        0
        inequality constraints with only lower bounds:        0
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        0

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0  0.0000000e+00 7.76e+01 0.00e+00   0.0 0.00e+00    -  0.00e+00 0.00e+00   0
   1  6.7321529e-01 8.09e+00 5.16e+01 -11.0 3.72e+01    -  1.00e+00 1.00e+00h  1
   2  1.3718868e+00 1.57e+00 5.39e+01 -11.0 1.02e+01    -  1.00e+00 1.00e+00h  1
   3  1.4050365e+00 1.98e-01 3.66e+01 -11.0 2.36e+00    -  1.00e+00 1.00e+00h  1
   4  1.4015386e+00 2.14e-03 2.98e+00 -11.0 1.22e-01    -  1.00e+00 1.00e+00h  1
   5  1.3967390e+00 4.05e-07 2.46e-03 -11.0 2.46e-03    -  1.00e+00 1.00e+00h  1
   6  1.2710070e-01 6.28e-02 4.15e-01 -11.0 7.18e-01    -  1.00e+00 1.00e+00f  1
   7  1.2374339e-01 1.50e-03 7.61e-03 -11.0 7.82e-02    -  1.00e+00 1.00e+00h  1
   8  1.2348293e-01 8.47e-05 2.99e-04 -11.0 2.08e-02    -  1.00e+00 1.00e+00h  1
   9  1.2348264e-01 1.94e-08 2.84e-05 -11.0 4.14e-04    -  1.00e+00 1.00e+00h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  10  1.2348264e-01 5.10e-11 1.96e-09 -11.0 1.96e-05    -  1.00e+00 1.00e+00h  1

Number of Iterations....: 10

                                   (scaled)                 (unscaled)
Objective...............:   1.2348263509146683e-01    1.2348263509146683e-01
Dual infeasibility......:   1.9599363061326147e-09    1.9599363061326147e-09
Constraint violation....:   5.0980553112367488e-11    5.0980553112367488e-11
Variable bound violation:   0.0000000000000000e+00    0.0000000000000000e+00
Complementarity.........:   0.0000000000000000e+00    0.0000000000000000e+00
Overall NLP error.......:   1.9599363061326147e-09    1.9599363061326147e-09


Number of objective function evaluations             = 11
Number of objective gradient evaluations             = 11
Number of equality constraint evaluations            = 11
Number of inequality constraint evaluations          = 0
Number of equality constraint Jacobian evaluations   = 11
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations             = 0
Total seconds in IPOPT                               = 0.448

EXIT: Optimal Solution Found.
reading sources... [100%] theory
/home/moorepants/src/opty/opty/direct_collocation.py:docstring of opty.direct_collocation.ConstraintCollocator:28: WARNING: Inline literal start-string without end-string.
/home/moorepants/src/opty/opty/direct_collocation.py:docstring of opty.direct_collocation.Problem:48: WARNING: Inline literal start-string without end-string.
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying downloadable files... [100%] examples/plot_two_link_pendulum_on_a_cart.py
copying static files... done
copying extra files... done
done
writing output... [100%] theory
/home/moorepants/src/opty/docs/examples/index.rst:126: WARNING: Failed to create a cross reference. A title or caption not found: 'sphx_glr_examples_plot_sliding_block.py'
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/sg_execution_times.rst:53: WARNING: Failed to create a cross reference. A title or caption not found: 'sphx_glr_examples_plot_sliding_block.py'
/home/moorepants/src/opty/docs/sg_execution_times.rst:53: WARNING: Failed to create a cross reference. A title or caption not found: 'sphx_glr_examples_plot_sliding_block.py'
generating indices... genindex py-modindex done
highlighting module code... [100%] opty.utils
writing additional pages... search done
copying images... [100%] examples/one-legged-time-trial.svg
dumping search index in English (code: en)... done
dumping object inventory... done

Sphinx-Gallery successfully executed 1 out of 1 file subselected by:

    gallery_conf["filename_pattern"] = '/plot'
    gallery_conf["ignore_pattern"]   = '__init__\\.py'

after excluding 7 files that had previously been run (based on MD5).

embedding documentation hyperlinks...
embedding documentation hyperlinks for examples... [100%] plot_parallel_park.html
build succeeded, 14 warnings.

The HTML pages are in _build/html.
(opty-dev) docs(plot_sliding_block_2)$ firefox _build/html/examples/index.html

After than my browser opens and I see the version of the documentation with your new additions:
image

And you can see that the errors in the output of make html are likely tied to the irregular display of the thumbnail of the new example.

You have a Windows computer with different software installed than me, so the exact commands I typed above will likely not work for you, but if you adjust them for your setup, then you can do the same.

The commands I run are the same commands that the automatic Github based systems run on every Pull request to build the documentation here: https://opty.readthedocs.io/latest/

@Peter230655
Copy link
Contributor Author

You have python setup already. You can run it many ways: jupyter, vs code, command prompt, etc. The command prompt is the most basic and universal way to interact with python, thus all instructions we provide in development is for the command prompt. If we explain the hundreds of ways to interact with python in our readme's, they'd be miles long.

I sent the two software carpentry lessions: shell (command prompt) and git. If you master those two lessons you have the basics in place. Everything else (github, jupyter, vs code) is just a glossy cover over those two things.

Yes, you did! I saw the video, which somehow pointed to VSC git, so I thought I'd found an easier way.
I think, I will simply have to learn how to use a shell!

@moorepants
Copy link
Member

I think, I will simply have to learn how to use a shell!

If you want to contribute to development with software, it is a necessity. You can minimize the use of it via various tools (glossy covers), but there are some aspects that simply have to be done at the command prompt.

@Peter230655
Copy link
Contributor Author

For example this is how I test your pull request at the command prompt (note this will have slight differences on windows):

moorepants$ cd ~/src/opty/
opty(master)$ git fetch Peter230655 plot_sliding_block_2
remote: Enumerating objects: 33, done.
remote: Counting objects: 100% (31/31), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 22 (delta 15), reused 17 (delta 10), pack-reused 0
Unpacking objects: 100% (22/22), 7.34 KiB | 577.00 KiB/s, done.
From github.com:Peter230655/opty
 * branch            plot_sliding_block_2 -> FETCH_HEAD
 * [new branch]      plot_sliding_block_2 -> Peter230655/plot_sliding_block_2
opty(master)$ git checkout --track Peter230655/plot_sliding_block_2 
branch 'plot_sliding_block_2' set up to track 'Peter230655/plot_sliding_block_2'.
Switched to a new branch 'plot_sliding_block_2'
opty(plot_sliding_block_2)$ conda env create -f opty-dev-env.yml
<lots of conda install output>
opty(plot_sliding_block_2)$ conda activate opty-dev 
(opty-dev) opty(plot_sliding_block_2)$ which python
/home/moorepants/miniconda/envs/opty-dev/bin/python
(opty-dev) opty(plot_sliding_block_2)$ cd docs/
(opty-dev) docs(plot_sliding_block_2)$ make clean
Removing everything under '_build'...
(opty-dev) docs(plot_sliding_block_2)$ make html
Running Sphinx v7.3.7
making output directory... done
Using Sphinx-Gallery to convert rst text blocks to markdown for .ipynb files.
[autosummary] generating autosummary for: api.rst, examples.rst, examples/index.rst, examples/plot_betts2003.rst, examples/plot_drone.rst, examples/plot_one_legged_time_trial.rst, examples/plot_parallel_park.rst, examples/plot_pendulum_swing_up_fixed_duration.rst, examples/plot_pendulum_swing_up_variable_duration.rst, examples/plot_sliding_block.rst, examples/plot_two_link_pendulum_on_a_cart.rst, examples/sg_execution_times.rst, index.rst, sg_execution_times.rst, theory.rst
generating gallery...
generating gallery for examples... [100%] plot_one_legged_time_trial.py
******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit https://github.com/coin-or/Ipopt
******************************************************************************

This is Ipopt version 3.14.16, running with linear solver MUMPS 5.7.2.

Number of nonzeros in equality constraint Jacobian...:    91885
Number of nonzeros in inequality constraint Jacobian.:        0
Number of nonzeros in Lagrangian Hessian.............:        0

Total number of variables............................:     4241
                     variables with only lower bounds:        0
                variables with lower and upper bounds:     2121
                     variables with only upper bounds:        0
Total number of equality constraints.................:     3181
Total number of inequality constraints...............:        0
        inequality constraints with only lower bounds:        0
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        0

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0  2.0000000e-02 6.84e+02 1.46e-05   0.0 0.00e+00    -  0.00e+00 0.00e+00   0
   1  1.9179269e-02 6.80e+02 3.25e+03   1.0 6.16e+02    -  1.28e-02 1.03e-02f  1
   2  1.9031353e-02 6.79e+02 8.15e+03   2.0 5.27e+02    -  1.36e-01 2.59e-03f  1
   3  1.8883513e-02 6.78e+02 6.45e+04   3.1 5.11e+02    -  3.18e-02 3.07e-03h  1
   4  1.8891090e-02 6.78e+02 7.92e+04  -4.3 5.01e+02    -  7.94e-04 1.33e-04h  1
   5  1.8923894e-02 6.77e+02 1.00e+05   3.6 7.85e+02    -  1.34e-03 6.70e-04h  1
   6  1.9050732e-02 6.77e+02 1.10e+06   3.6 4.89e+02    -  5.10e-03 5.02e-04h  1
   7  1.9610477e-02 6.76e+02 2.68e+06   3.6 2.87e+02    -  5.19e-03 1.54e-03h  1
   8  1.9694127e-02 6.76e+02 3.38e+06   3.6 5.93e+02    -  6.80e-04 2.56e-04h  1
   9  1.9874606e-02 6.75e+02 3.81e+06   3.6 7.94e+02    -  6.31e-04 5.63e-04h  1
<lots of ipopt output>
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 200  2.4607361e-02 3.79e-05 1.04e-09 -11.0 8.13e-03    -  1.00e+00 1.00e+00H  1
 201  2.4607361e-02 1.20e-05 3.15e-10 -11.0 4.21e-03    -  1.00e+00 1.00e+00H  1
 202  2.4607361e-02 1.72e-07 2.87e-11 -11.0 5.91e-04    -  1.00e+00 1.00e+00H  1
 203  2.4607361e-02 5.50e-06 3.03e-09 -11.0 4.64e-03    -  1.00e+00 6.25e-02h  5
 204  2.4607361e-02 1.34e-11 1.97e-11 -11.0 1.98e-07  -4.0 1.00e+00 1.00e+00h  1

Number of Iterations....: 204

                                   (scaled)                 (unscaled)
Objective...............:   2.4607360894979963e-02    2.4607360894979963e-02
Dual infeasibility......:   1.9668184546835490e-11    1.9668184546835490e-11
Constraint violation....:   1.3385070829485812e-11    1.3385070829485812e-11
Variable bound violation:   1.0734583222316019e-08    1.0734583222316019e-08
Complementarity.........:   1.0000000671879242e-11    1.0000000671879242e-11
Overall NLP error.......:   1.9668184546835490e-11    1.9668184546835490e-11


Number of objective function evaluations             = 287
Number of objective gradient evaluations             = 192
Number of equality constraint evaluations            = 287
Number of inequality constraint evaluations          = 0
Number of equality constraint Jacobian evaluations   = 206
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations             = 0
Total seconds in IPOPT                               = 5.985

EXIT: Optimal Solution Found.

computation time summary:
    - ../examples-gallery/plot_one_legged_time_trial.py:                 46.76 sec   0.0 MB
    - ../examples-gallery/plot_betts2003.py:                              0.00 sec   0.0 MB
    - ../examples-gallery/plot_drone.py:                                  0.00 sec   0.0 MB
    - ../examples-gallery/plot_parallel_park.py:                          0.00 sec   0.0 MB
    - ../examples-gallery/plot_pendulum_swing_up_fixed_duration.py:       0.00 sec   0.0 MB
    - ../examples-gallery/plot_pendulum_swing_up_variable_duration.py:    0.00 sec   0.0 MB
    - ../examples-gallery/plot_sliding_block.py:                          0.00 sec   0.0 MB
    - ../examples-gallery/plot_two_link_pendulum_on_a_cart.py:            0.00 sec   0.0 MB
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 15 source files that are out of date
updating environment: [new config] 15 added, 0 changed, 0 removed
This is Ipopt version 3.14.16, running with linear solver MUMPS 5.7.2.

Number of nonzeros in equality constraint Jacobian...:    49990
Number of nonzeros in inequality constraint Jacobian.:        0
Number of nonzeros in Lagrangian Hessian.............:        0

Total number of variables............................:    10001
                     variables with only lower bounds:        0
                variables with lower and upper bounds:        0
                     variables with only upper bounds:        0
Total number of equality constraints.................:     9998
Total number of inequality constraints...............:        0
        inequality constraints with only lower bounds:        0
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        0

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0  0.0000000e+00 7.76e+01 0.00e+00   0.0 0.00e+00    -  0.00e+00 0.00e+00   0
   1  6.7321529e-01 8.09e+00 5.16e+01 -11.0 3.72e+01    -  1.00e+00 1.00e+00h  1
   2  1.3718868e+00 1.57e+00 5.39e+01 -11.0 1.02e+01    -  1.00e+00 1.00e+00h  1
   3  1.4050365e+00 1.98e-01 3.66e+01 -11.0 2.36e+00    -  1.00e+00 1.00e+00h  1
   4  1.4015386e+00 2.14e-03 2.98e+00 -11.0 1.22e-01    -  1.00e+00 1.00e+00h  1
   5  1.3967390e+00 4.05e-07 2.46e-03 -11.0 2.46e-03    -  1.00e+00 1.00e+00h  1
   6  1.2710070e-01 6.28e-02 4.15e-01 -11.0 7.18e-01    -  1.00e+00 1.00e+00f  1
   7  1.2374339e-01 1.50e-03 7.61e-03 -11.0 7.82e-02    -  1.00e+00 1.00e+00h  1
   8  1.2348293e-01 8.47e-05 2.99e-04 -11.0 2.08e-02    -  1.00e+00 1.00e+00h  1
   9  1.2348264e-01 1.94e-08 2.84e-05 -11.0 4.14e-04    -  1.00e+00 1.00e+00h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  10  1.2348264e-01 5.10e-11 1.96e-09 -11.0 1.96e-05    -  1.00e+00 1.00e+00h  1

Number of Iterations....: 10

                                   (scaled)                 (unscaled)
Objective...............:   1.2348263509146683e-01    1.2348263509146683e-01
Dual infeasibility......:   1.9599363061326147e-09    1.9599363061326147e-09
Constraint violation....:   5.0980553112367488e-11    5.0980553112367488e-11
Variable bound violation:   0.0000000000000000e+00    0.0000000000000000e+00
Complementarity.........:   0.0000000000000000e+00    0.0000000000000000e+00
Overall NLP error.......:   1.9599363061326147e-09    1.9599363061326147e-09


Number of objective function evaluations             = 11
Number of objective gradient evaluations             = 11
Number of equality constraint evaluations            = 11
Number of inequality constraint evaluations          = 0
Number of equality constraint Jacobian evaluations   = 11
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations             = 0
Total seconds in IPOPT                               = 0.448

EXIT: Optimal Solution Found.
reading sources... [100%] theory
/home/moorepants/src/opty/opty/direct_collocation.py:docstring of opty.direct_collocation.ConstraintCollocator:28: WARNING: Inline literal start-string without end-string.
/home/moorepants/src/opty/opty/direct_collocation.py:docstring of opty.direct_collocation.Problem:48: WARNING: Inline literal start-string without end-string.
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying downloadable files... [100%] examples/plot_two_link_pendulum_on_a_cart.py
copying static files... done
copying extra files... done
done
writing output... [100%] theory
/home/moorepants/src/opty/docs/examples/index.rst:126: WARNING: Failed to create a cross reference. A title or caption not found: 'sphx_glr_examples_plot_sliding_block.py'
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/index.rst:158: WARNING: toctree contains reference to document 'examples/plot_sliding_block' that doesn't have a title: no link will be generated
/home/moorepants/src/opty/docs/examples/sg_execution_times.rst:53: WARNING: Failed to create a cross reference. A title or caption not found: 'sphx_glr_examples_plot_sliding_block.py'
/home/moorepants/src/opty/docs/sg_execution_times.rst:53: WARNING: Failed to create a cross reference. A title or caption not found: 'sphx_glr_examples_plot_sliding_block.py'
generating indices... genindex py-modindex done
highlighting module code... [100%] opty.utils
writing additional pages... search done
copying images... [100%] examples/one-legged-time-trial.svg
dumping search index in English (code: en)... done
dumping object inventory... done

Sphinx-Gallery successfully executed 1 out of 1 file subselected by:

    gallery_conf["filename_pattern"] = '/plot'
    gallery_conf["ignore_pattern"]   = '__init__\\.py'

after excluding 7 files that had previously been run (based on MD5).

embedding documentation hyperlinks...
embedding documentation hyperlinks for examples... [100%] plot_parallel_park.html
build succeeded, 14 warnings.

The HTML pages are in _build/html.
(opty-dev) docs(plot_sliding_block_2)$ firefox _build/html/examples/index.html

After than my browser opens and I see the version of the documentation with your new additions: image

And you can see that the errors in the output of make html are likely tied to the irregular display of the thumbnail of the new example.

You have a Windows computer with different software installed than me, so the exact commands I typed above will likely not work for you, but if you adjust them for your setup, then you can do the same.

The commands I run are the same commands that the automatic Github based systems run on every Pull request to build the documentation here: https://opty.readthedocs.io/latest/

surely this will help me, as I see the commands and can copy them!!

@Peter230655
Copy link
Contributor Author

I think, I will simply have to learn how to use a shell!

If you want to contribute to development with software, it is a necessity. You can minimize the use of it via various tools (glossy covers), but there are some aspects that simply have to be done at the command prompt.

I think, you are right! Just seems harder than writing programs. I think, it was easier for me to modify KanesMethod to accept nonlinear motion constraints than to put my sliding block on a branch! :-(

@moorepants
Copy link
Member

Everything you type at the command prompt is a program. It is just written in BASH, Windows batch language, or the language of what ever shell/prompt you are using.

@Peter230655
Copy link
Contributor Author

I think, I will simply have to learn how to use a shell!

If you want to contribute to development with software, it is a necessity. You can minimize the use of it via various tools (glossy covers), but there are some aspects that simply have to be done at the command prompt.

I assume, that if you want to build house, you need to be able to handle a hammer a saw and a carpenter's square. Similr here.
It seems to be a million commands: pwd, ls, -F, cd, -s, mkdir, .....

@moorepants
Copy link
Member

There are also a million commands in Python :)

@Peter230655
Copy link
Contributor Author

Fair enough - but at least I know some of them! :-)
I'll learn the bash - Chinese, too!

@Peter230655 Peter230655 deleted the plot_sliding_block_2 branch July 23, 2024 13:08
@Peter230655 Peter230655 restored the plot_sliding_block_2 branch July 23, 2024 13:08
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.

2 participants