Changeset 30553e1 in tol


Ignore:
Timestamp:
Oct 21, 2008, 11:00:18 AM (18 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
8f0ce25
Parents:
14c595e
Message:

Fixed bug in Write.Constraints

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@37 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/stdlib/math/stat/models/bayesian/bysMcmc/bsr/_import.tol

    r14c595e r30553e1  
    301301  {
    302302    Set gc = handler::Get.GenericConstraint(r);
    303     Real lb = GT(gc->LowerBound,-1/0);
    304     Real ub = LT(gc->UpperBound,+1/0);
    305     Text exp =  If(!Card(gc->LinearComb),"", SetSum(
     303    Real lb = And(!IsUnknown(gc->LowerBound),GT(gc->LowerBound,-1/0));
     304    //WriteLn("TRACE gc->LowerBound ="<<gc->LowerBound);
     305    Real ub = And(!IsUnknown(gc->UpperBound),LT(gc->UpperBound,+1/0));
     306    //WriteLn("TRACE gc->UpperBound ="<<gc->UpperBound);
     307    //WriteLn("TRACE lb ="<<lb+" ub="<<ub);
     308    Text expr =  If(!Card(gc->LinearComb),"", SetSum(
    306309      EvalSet(gc->LinearComb, Text(Bsr.LinearCombTerm term)
    307310      {
    308311        If(term->Coefficient==0,"",
    309           "" <<term->Coefficient+"*"<<term->Parameter)
     312          RealTextS(term->Coefficient)+"*"<<term->Parameter)
    310313      })));
    311314    If(lb, FPutText(f, RealTextS(gc->LowerBound)+"<="+expr+";\n"));
    312     If(ub, FPutText(f, RealTextS(gc->LowerBound)+">="+expr+";\n"));
     315    If(ub, FPutText(f, RealTextS(gc->UpperBound)+">="+expr+";\n"));
    313316    Real 0
    314317  });
Note: See TracChangeset for help on using the changeset viewer.