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

Update IPYNB notebooks #4

Open
ezgioz opened this issue Sep 19, 2017 · 1 comment
Open

Update IPYNB notebooks #4

ezgioz opened this issue Sep 19, 2017 · 1 comment

Comments

@ezgioz
Copy link
Collaborator

ezgioz commented Sep 19, 2017

There is one error to be solved and some points to be updated:

  • Error: Notebook validation failed
    Each time I open a IPYNB file, I have the following error:

n invalid notebook may not function properly. The validation error was:
Notebook validation failed: Additional properties are not allowed ('source' was unexpected):
{
"data": {
"image/png": >"iVBORw0KGgoAAAANSUhEUgAAAkwAAAHHCAYAAABN+wdFAAAABHNCSVQICAgIfAhkiAAAAAlw>SFlzAAAPYQAAD2EBqD+naQAAIABJREFUeJzs3XdUFOf+BvBnF1iWjkgvgmLBgoAFRMWSYDA .....

  • To be updated
    In one of the files, solution of the model is called "dr" --> It should be "sol" instead, and call "sol.dr" for the decision rule.
    Example:

@time dr_gdp = Dolo.time_iteration(model, verbose=false, maxit=10000);
df_gdp = Dolo.tabulate(model, dr_gdp, :k; n_steps=50)

instead of

@time sol_gdp = Dolo.time_iteration(model, verbose=false, maxit=10000);
df_gdp = Dolo.tabulate(model, sol_gdp.dr, :k; n_steps=50)

Pablo's comment: Maybe we could create a new method for tabulate function to accept "sol" and extract "sol.dr" in the function.

Example:

@time sol_gdp = Dolo.time_iteration(model, verbose=false, maxit=10000);

Then calling

df_gdp = Dolo.tabulate(model, sol_gdp, :k; n_steps=50)

will yield to same output as

df_gdp = Dolo.tabulate(model, sol_gdp.dr, :k; n_steps=50)

  • To be updated
    In some julia files such as "RBCS/test_algos.jl", methods are not up to date. Calling "details = yes" for example, returning an error.
@albop
Copy link
Member

albop commented Sep 19, 2017

Thank you @ezgioz for filing this issue.
Regarding the effects of removing details=true (it has been removed as an option), I think the notebooks should use the solution object as it has some pedagogic value, like showing the algo has actually converged.
This doesn't prevent to have compatibility methods to accept a solution object as initial guess. This should probably be an issue on the Dolo.jl repo though.
IMHO, test_algos.jl has nothing to do there. It could just be removed.

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

No branches or pull requests

2 participants