Coder Social home page Coder Social logo

Comments (2)

samthiriot avatar samthiriot commented on July 1, 2024

Error context:

> library(testthat)
> library(gosp.dpp)
> 
> test_check("gosp.dpp")

starting the resolution of the case
	according to user weights, we already know: hat.nA,hat.fi,hat.fj
	checking the consistency of the current solution with hat.nA,hat.fi,hat.fj
	=> the solution is consistent
	solving equations based on known variables: hat.nA,hat.fi,hat.fj
		hat.nA, hat.fi -> hat.ci
	starting the investigation of the missing chain: hat.di,hat.pij,hat.dj
		will test 7 hypothesis
		trying with hypothesis: hat.di=di
			solving equations based on known variables: hat.nA,hat.fi,hat.fj,hat.ci,hat.di
				hat.ci, hat.di -> hat.ni
				hat.ni -> hat.nL
				hat.ni -> hat.nij, hat.pij
				hat.nij -> hat.nj
				hat.pij -> hat.pi
				hat.pij -> hat.pj
				hat.pj, hat.fj -> hat.dj
				hat.di -> hat.pdi
				hat.dj -> hat.pdj
					unable to update hat.pdj to fit hat.dj=0.622364469795453,0.895299759849167,0.861210533205464,1
			found an invalid solution.
		trying with hypothesis: hat.pij=pij
			solving equations based on known variables: hat.nA,hat.fi,hat.fj,hat.ci,hat.pij
				hat.pij -> hat.pi
				hat.pij -> hat.pj
				hat.pi, hat.fi -> hat.di
				hat.pj, hat.fj -> hat.dj
				hat.di -> hat.pdi
				hat.dj -> hat.pdj
					unable to update hat.pdj to fit hat.dj=0.812681579154931,1,0.857344168555347,0.923097870582232
			found an invalid solution.
		trying with hypothesis: hat.dj=dj
			solving equations based on known variables: hat.nA,hat.fi,hat.fj,hat.ci,hat.dj
				hat.fj, hat.dj -> hat.pj
				hat.pj -> hat.pij
				hat.dj -> hat.pdj
				hat.pij -> hat.pi
				hat.pi, hat.fi -> hat.di
				hat.di -> hat.pdi
				hat.ci, hat.di -> hat.ni
				hat.ni -> hat.nL
				hat.ni -> hat.nij, hat.pij
				hat.nij -> hat.nj
				hat.nj, hat.dj -> hat.cj
				hat.pdi, hat.ci -> hat.ndi
				hat.pdj, hat.cj -> hat.ndj
				hat.cj -> hat.nB
			checking the consistency of the current solution with hat.nA,hat.fi,hat.fj,hat.ci,hat.dj,hat.pij,hat.di,hat.cj,hat.nB
			=> the solution is consistent
			we found a valid solution which provides:  hat.nA,hat.fi,hat.fj,hat.ci,hat.dj,hat.pij,hat.di,hat.cj,hat.nB 
		trying with hypothesis: hat.di=di,hat.pij=pij
			solving equations based on known variables: hat.nA,hat.fi,hat.fj,hat.ci,hat.di,hat.pij
				hat.ci, hat.di -> hat.ni
				hat.ni -> hat.nL
				hat.ni -> hat.nij, hat.pij
				hat.nij -> hat.nj
				hat.pij -> hat.pi
				hat.pij -> hat.pj
				hat.pj, hat.fj -> hat.dj
				hat.di -> hat.pdi
				hat.dj -> hat.pdj
					unable to update hat.pdj to fit hat.dj=0.622364469795453,0.895299759849167,0.861210533205464,1
			found an invalid solution.
		trying with hypothesis: hat.di=di,hat.dj=dj
			solving equations based on known variables: hat.nA,hat.fi,hat.fj,hat.ci,hat.di,hat.dj
				hat.ci, hat.di -> hat.ni
				hat.ni -> hat.nL
				hat.ni -> hat.nij, hat.pij
				hat.nij -> hat.nj
				hat.nj, hat.dj -> hat.cj
				hat.pij -> hat.pi
				hat.pij -> hat.pj
				hat.di -> hat.pdi
				hat.dj -> hat.pdj
				hat.cj -> hat.nB
				hat.pdi, hat.ci -> hat.ndi
				hat.pdj, hat.cj -> hat.ndj
			checking the consistency of the current solution with hat.nA,hat.fi,hat.fj,hat.ci,hat.di,hat.dj,hat.pij,hat.cj,hat.nB
			=> the solution is consistent
			we found a valid solution which provides:  hat.nA,hat.fi,hat.fj,hat.ci,hat.di,hat.dj,hat.pij,hat.cj,hat.nB 
		trying with hypothesis: hat.pij=pij,hat.dj=dj
			solving equations based on known variables: hat.nA,hat.fi,hat.fj,hat.ci,hat.pij,hat.dj
				hat.pij -> hat.pi
				hat.pij -> hat.pj
				hat.pi, hat.fi -> hat.di
				hat.di -> hat.pdi
				hat.dj -> hat.pdj
				hat.ci, hat.di -> hat.ni
				hat.ni -> hat.nL
				hat.ni -> hat.nij, hat.pij
				hat.nij -> hat.nj
				hat.nj, hat.dj -> hat.cj
				hat.pdi, hat.ci -> hat.ndi
				hat.pdj, hat.cj -> hat.ndj
				hat.cj -> hat.nB
			checking the consistency of the current solution with hat.nA,hat.fi,hat.fj,hat.ci,hat.pij,hat.dj,hat.di,hat.cj,hat.nB
			=> the solution is consistent
			we found a valid solution which provides:  hat.nA,hat.fi,hat.fj,hat.ci,hat.pij,hat.dj,hat.di,hat.cj,hat.nB 
		trying with hypothesis: hat.di=di,hat.pij=pij,hat.dj=dj
			solving equations based on known variables: hat.nA,hat.fi,hat.fj,hat.ci,hat.di,hat.pij,hat.dj
				hat.ci, hat.di -> hat.ni
				hat.ni -> hat.nL
				hat.ni -> hat.nij, hat.pij
				hat.nij -> hat.nj
				hat.nj, hat.dj -> hat.cj
				hat.pij -> hat.pi
				hat.pij -> hat.pj
				hat.di -> hat.pdi
				hat.dj -> hat.pdj
				hat.cj -> hat.nB
				hat.pdi, hat.ci -> hat.ndi
				hat.pdj, hat.cj -> hat.ndj
			checking the consistency of the current solution with hat.nA,hat.fi,hat.fj,hat.ci,hat.di,hat.pij,hat.dj,hat.cj,hat.nB
			=> the solution is consistent
			we found a valid solution which provides:  hat.nA,hat.fi,hat.fj,hat.ci,hat.di,hat.pij,hat.dj,hat.cj,hat.nB 
		found  4  solutions, we have to select the best according to weights
			solution ( 1 ) => NA 0 0 0 
			solution ( 2 ) => NA NA 0 0 
			solution ( 3 ) => NA NA NA 0 
			solution ( 4 ) => NA NA NA NA 
── 1. Error: constraints: nA, phi.A, phi.B (@test_basic1.R#85)  ────────────────
subscript out of bounds
1: matching.solve(prepared, nA = 50000, nB = 40000, nu.A = 0, phi.A = 0, delta.A = 1, 
       gamma = 1, delta.B = 1, phi.B = 0, nu.B = 1, verbose = TRUE) at testthat/test_basic1.R:85
2: resolve(sol, case, nA, nB, nu.A, phi.A, delta.A, nu.B, phi.B, delta.B, gamma, verbose = verbose)
3: resolve.missing.chain(sol.tmp, chain, case, nA, nB, nu.A, phi.A, delta.A, nu.B, phi.B, 
       delta.B, gamma, verbose = verbose)

from gosp.dpp.

samthiriot avatar samthiriot commented on July 1, 2024

seems due to a problem in the mean() function in older versions of R


	=> the solution is consistent
			we found a valid solution which provides:  hat.nA,hat.fi,hat.fj,hat.ci,hat.di,hat.dj,hat.pij,hat.cj,hat.nB 
[1] "computing the NRMSE of pij, for hat.pij="
        surface=1  surface=2  surface=3
size=1 0.14871773 0.04005239 0.01550551
size=2 0.07435887 0.13346571 0.03098990
size=3 0.03717943 0.10676412 0.12400186
size=4 0.01858972 0.05338206 0.21699269
[1] "original being"
       surface=1 surface=2 surface=3
size=1     0.200    0.0375    0.0125
size=2     0.100    0.1250    0.0250
size=3     0.050    0.1000    0.1000
size=4     0.025    0.0500    0.1750
[1] "difference is "
          surface=1   surface=2   surface=3
size=1 -0.051282268 0.002552389 0.003005514
size=2 -0.025641134 0.008465715 0.005989902
size=3 -0.012820567 0.006764122 0.024001859
size=4 -0.006410283 0.003382061 0.041992691
[1] "square is"
          surface=1    surface=2    surface=3
size=1 2.629871e-03 6.514691e-06 9.033112e-06
size=2 6.574678e-04 7.166832e-05 3.587893e-05
size=3 1.643669e-04 4.575334e-05 5.760892e-04
size=4 4.109173e-05 1.143834e-05 1.763386e-03
[1] "so mean is "
[1] NA
[1] "and thus"
[1] NA

from gosp.dpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.